Column transfer in mysql, and multiple fields are transferred to one field in a row, separated by commas
SELECT group_concat(a.id SEPARATOR ',') AS ids FROM ( SELECT * FROM tablename WHERE 1 = 1 ORDER BY rand() LIMIT 10 ) a
Column transfer in mysql, and multiple fields are transferred to one field in a row, separated by commas
SELECT group_concat(a.id SEPARATOR ',') AS ids FROM ( SELECT * FROM tablename WHERE 1 = 1 ORDER BY rand() LIMIT 10 ) a