Professional Web Applications Themes

Format query result. - MySQL

Hi ppl, Im having the time of my life with this database *sigh* Anyways, i have this problem which I can't solve. I would like to format the query result. I have a table like this: art_no 203 412 592 645 Now i want to break the rule and have my output looking like this: 203 412 592 645 So I get it on one row! Is this possible? Regards, Kasper K....

  1. #1

    Default Format query result.

    Hi ppl,

    Im having the time of my life with this database *sigh*
    Anyways, i have this problem which I can't solve. I would like to format
    the query result.

    I have a table like this:

    art_no
    203
    412
    592
    645

    Now i want to break the rule and have my output looking like this:

    203 412 592 645

    So I get it on one row!

    Is this possible?


    Regards,
    Kasper K.
    Kasper K Guest

  2. #2

    Default Re: Format query result.

    Kasper K wrote:
    > Hi ppl,
    >
    > Im having the time of my life with this database *sigh*
    > Anyways, i have this problem which I can't solve. I would like to
    > format the query result.
    >
    > I have a table like this:
    >
    > art_no
    > 203
    > 412
    > 592
    > 645
    >
    > Now i want to break the rule and have my output looking like this:
    >
    > 203 412 592 645
    >
    > So I get it on one row!
    >
    > Is this possible?
    >
    >
    > Regards,
    > Kasper K.
    Take a look at the GROUP_CONCAT function


    Paul Lautman Guest

  3. #3

    Default Re: Format query result.

    Paul Lautman skrev:
    > Take a look at the GROUP_CONCAT function
    Hej Paul,

    I read about GROUP_CONCAT and it looks like that is what I am looking
    for - great!
    Next thing, when I try to use it. It comes up with this error, which i
    don't get. Cause i follow the mysql manual proberly:

    mysql> SELECT wheel_type GROUP_CONCAT(wheel_type) FROM wheels_hjulex
    GROUP BY wheel_type;

    ERROR 1064 : You have an error in your SQL syntax. Check the manual
    that corresponds to your MySQL server version for the right syntax to
    use near '(wheel_type) from wheels_hjulex group by wheel_type' at line 1

    Do you know what causes this?

    Cheers,
    Kasper K.
    Kasper K Guest

Similar Threads

  1. Question about get web service result in actionscriptand convert data format
    By TigerLittle in forum Macromedia Flex General Discussion
    Replies: 8
    Last Post: June 14th, 08:37 PM
  2. Accessing webservice result - e4x format
    By badu in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: May 25th, 10:24 AM
  3. displaying query result of 0 as N/A
    By eggwater in forum Macromedia ColdFusion
    Replies: 3
    Last Post: May 10th, 11:34 AM
  4. Q. How to format a calculated result
    By Scott in forum FileMaker
    Replies: 1
    Last Post: October 8th, 08:13 PM
  5. how to add another column to a query result?
    By Junaili Lie in forum Microsoft SQL / MS SQL Server
    Replies: 4
    Last Post: July 7th, 06:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139