Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alternative to group_concat for early versions of mysql

Status
Not open for further replies.

spidgeon12

Programmer
Oct 16, 2006
2
GB
Hi,
Is there an alternative to group concat, if you are using a lower version of mysql. If any one has any ideas it would be great, currently my code (thanks to some one from these forums) looks like this.

SELECT c.clientID, group_concat(ci.interestID) as interests
FROM Clients AS c
JOIN ClientInterests AS ci ON c.clientID = ci.clientID
GROUP BY c.clientID
HAVING find_in_set(1, interests)
AND find_in_set(3, interests)

Is there any way of doing this on a lower version of mysql?
Is it possible to wirte a function similar to group_concat?



Many thanks Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top