i am looking for some advice on what is the best approach to get this done :)


my datababase holds a table categories

with the columns

|category_id|category_name|category_parent_id|

i am showing my users a html sortable table with the following columns

|category_id|category_name|category_parent_name|

so what i want, is to do a ORDERBY on the category_parent_names so i would like to have a temp extra column like

|category_id|category_name|category_parent_id|category_parent_name|

so i can sort on category_parent_name.

What is the best way to go on this?

i created

|category_id|category_name|category_parent_id|category_parent_name|

as a array in php and sorted it :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.