dave416 Posted May 14, 2008 Share Posted May 14, 2008 hey, heres my problem. i have a table of data on a webpage called team-roster.php and its sorted according to 1 of the columns but i also want it to be sortable by other columns via the same file (team-roster.php). im thinking maybe the solution is team-roster.php?sort=height or somewhere along those lines but im not sure how to get there and im confused about the whole thing. i apologize, i am a very recreational web developer. forgot to mention by the way, the table of data is drawn from a mysql database via php. thanks for any help Link to comment https://forums.phpfreaks.com/topic/105538-solved-sorting-with-mysql-and-php/ Share on other sites More sharing options...
peranha Posted May 14, 2008 Share Posted May 14, 2008 yes, you can do that team-roster.php?sort=height and then on the page it will be $sort = $_GET['sort']; and the query will be Select * FROM table ORDER BY $sort; Link to comment https://forums.phpfreaks.com/topic/105538-solved-sorting-with-mysql-and-php/#findComment-540640 Share on other sites More sharing options...
dave416 Posted May 14, 2008 Author Share Posted May 14, 2008 brilliant, thanks a ton Link to comment https://forums.phpfreaks.com/topic/105538-solved-sorting-with-mysql-and-php/#findComment-540642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.