MySQL Sortable HTML Table

wxdqz

New Member
Are sortable tables inherently a monster to write? (PHP->MySQL)

I am trying to figure it out (for the first PHP script I have ever written) and the only way I see of doing it is changing the variables submitted in the original query into a variable (newsort or something) that contains \"?number=$number&?model=$model\" etc etc etc... and then during the print <thead><tr><td>backto.php$newsort

Then that would submit itself to do a whole new query with the variable for ORDER by being switched with whatever column was clicked on. Now I don\'t know how to determine which column was clicked on without sending a hidden value that would make the script that much more complex.

There has to be an easier way. Any examples anyone?
 
Back
Top