ccrevcypsys Posted September 10, 2007 Share Posted September 10, 2007 i want to be able to click on the title of the column of my repeated table and organize it. Well heres a picture i just dont know how to talk about it so here so does anyone have anything that can help me with this? cause i have no idea on where to even start Quote Link to comment https://forums.phpfreaks.com/topic/68754-ordering-lists/ Share on other sites More sharing options...
almightyegg Posted September 10, 2007 Share Posted September 10, 2007 mylink.php?sortby=$columname $colsort = $_GET['sortby']; $query = mysql_query("SELECT * FROM tbl WHERE something='$something' ORDER BY $colsort"); $colsort would be the same as column in database Quote Link to comment https://forums.phpfreaks.com/topic/68754-ordering-lists/#findComment-345577 Share on other sites More sharing options...
ccrevcypsys Posted September 10, 2007 Author Share Posted September 10, 2007 whats the $something? Quote Link to comment https://forums.phpfreaks.com/topic/68754-ordering-lists/#findComment-345591 Share on other sites More sharing options...
almightyegg Posted September 10, 2007 Share Posted September 10, 2007 what ever you're wanting to select the table you have is generated through mysql_query yes? then a while? basically just add ORDER BY $colsort to your mysql_query Quote Link to comment https://forums.phpfreaks.com/topic/68754-ordering-lists/#findComment-345593 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.