
February 4th, 2013, 12:11 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Location: Paris, France
Posts: 15
Time spent in forums: 4 h 38 m 36 sec
Reputation Power: 0
|
|
|
GROUP_CONCAT question
I'm wondering how (if possible) to control the order of the values that go into the GROUP_CONCAT output
I would like them to be based on an ID number that I have associated with their names ("p_id" which is different from their "id" number)
When I run the following into MySQL the list seems to be ordered arbitrarily or based on something else
PHP Code:
SELECT Year, GROUP_CONCAT(CONCAT((LEFT(FName,1)),"."," ",LName)) AS Player
FROM gg
WHERE lid = 1
GROUP BY Year
Thanks in advance!
|