vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 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 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. |