I'm using the query suggested in this post https://stackoverflow.com/a/51816820/6822845 to list my table contents. This is working really fine, I get a list of every section with its subsections comma seperated in another column so I can explode it and convert it to an array. My problem is, that my sections table(mentioned under my other post linked above) has another column named "sorder" that holds the displaying order. I don't know why, but I'm not able to output it with the column selects as its every time 0.
SELECT sections.sorder as sorder ,section_titel as t1,
GROUP_CONCAT(sub_section_titel) as t2
FROM sections
LEFT JOIN sub_sections ON section_id = sId
GROUP BY t1
ORDER by sorder
Every time I run it sorder displays as "0". But it's not 0. The weird thing is, that I can read the "iorder" column which is in my sub_section table. But the "sorder"-column which is in the main-table "sections" isn't accessible / every time 0. I'm using Mysql:
SELECT sections.sorder as sorder section_titel as t1,you're lacking a comma after sorder