Quick Search:
 
 mySQL: Make comma-separated list of strings Jump to:  
Category: >> mySQL >> Make comma-separated list of strings  

<< lastnext >>

Snippet Name: Make comma-separated list of strings

Description: Build a comma-separated list of strings in mySQL.

Comment: (none)

Language: MYSQL
Highlight Mode: MYSQL
Last Modified: March 01st, 2009

SELECT cats.id AS cat_id, GROUP_CONCAT(keyword ORDER BY keyword DESC SEPARATOR ',') AS keywords FROM YOURPREFIX_categories cats, YOURPREFIX_keywords kws 
WHERE cats.id = kws.cat_id 
GROUP BY cats.id


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org