GROUP_CONCAT Equivalent

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
DevBear
Forum Newbie
Posts: 4
Joined: Mon May 09, 2005 11:34 pm

GROUP_CONCAT Equivalent

Post by DevBear »

The following SELECT statement works on my local site, but not on my remote site because my host hasn't upgraded to MySQL 4.1.

Code: Select all

$res = mysql_query("SELECT GROUP_CONCAT(DISTINCT Area SEPARATOR ', ') as Area, Class, ClassCommon, OrderCommon, `Order`
FROM symbols WHERE Class = '$myname' GROUP BY `Order` ORDER BY `Order`");
So what would be an equivalent SELECT statement that would work with MySQL 4.0?

Thanks.
Post Reply