I’m producing a string with GROUP_CONCAT in MySQL.
There are 2 columns I need to select for each row being id and name, how should I format the string in the query so I can produce an array that couples the ids and names in PHP at optimal speed?
For example (my attempt):
GROUP_CONCAT producing
{"id":1,"name":"python"},{"id":2,"name":"ruby"}
Then convert this to an array in PHP.
I dont know why you are attempting this. But this query should work