php - How to display data in a tree structure basen on column values -


i've table structure :

enter image description here

and want display data in following format :

a     1     2     3      a1         4         5      a1         a2             6             7  b     8     9 

i'm using php mysql , i'm not able think how query db.

you can begin following query:

select * yourtable order category_1,          coalesce(category_2, ''),          coalesce(category_3, '') 

Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -