954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Create a Temp Column to do a ORDER BY in query

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?

Frankey
Light Poster
35 posts since Mar 2010
Reputation Points: 10
Solved Threads: 4
 

i created

|category_id|category_name|category_parent_id|category_parent_name|

as a array in php and sorted it :)

Frankey
Light Poster
35 posts since Mar 2010
Reputation Points: 10
Solved Threads: 4
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: