On my search results page I have a series of columns that I would like to turn into links that resort the recordset(search.php?orderby=date).
What exactly are the logistics? I am not even sure how to attack this.
Thanks.
alphacooler
6:23 am on Sep 26, 2005 (gmt 0)
The way I have it setup now is by using a number of "if statements" to check the URL variable and if true it runs the given recordset. So I have 4 if statements and 4 recordsets. Does this sound like the correct way to attack this?
coopster
7:29 pm on Sep 26, 2005 (gmt 0)
If I understand you correctly you are going to need to run the same search query each time as well as modify the ORDER BY clause. So, you need to carry the search criteria somehow (hidden variables in the page or in a COOKIE or SESSION) and then when the user clicks on your *sort column* option you are going to have to modify the ORDER BY clause. A common practice is to set a default ORDER BY clause and then check for any changes in the form variables (or GET query string).