-
April 1st, 2009, 07:53 PM #1Junior Member
- Join Date
- Apr 2009
- Posts
- 1
How can I sort by column headings in php mysql?
I set up a results page which shows me results from my query...
$query_WADAproperties = "SELECT id, pic, address, city, state, submarket, type, class, year, buildingsize, floorsize, space, broker, annualrent FROM properties ORDER BY id ASC";
How would I set up the ORDER BY to be a variable so when I click on a column heading it passes the variable to the php and re-sorts it?
I would think that I need to declare a variable that defaults to "id" if nothing is passed to it and put it somewhere in the php.... and make the headings clickable, pointing back to the results.php with a parameter, but have no idea how.
Thanks!
Rich
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
ranking in php mysql, please help
By unwanted in forum Webmastering and ProgrammingReplies: 18Last Post: July 10th, 2007, 10:10 PM -
Help me with php, and mySQL
By EXreaction in forum Webmastering and ProgrammingReplies: 6Last Post: February 13th, 2006, 01:00 AM -
PHP / MySQL coding help
By VillageIdiot906 in forum Webmastering and ProgrammingReplies: 3Last Post: February 22nd, 2005, 11:54 PM -
PHP / MySQL argument
By VillageIdiot906 in forum Webmastering and ProgrammingReplies: 2Last Post: February 22nd, 2005, 09:15 PM -
mysql/php-blank
By jomoal99 in forum Webmastering and ProgrammingReplies: 2Last Post: August 16th, 2004, 05:48 AM



LinkBack URL
About LinkBacks



Reply With Quote

sorry
Assosiations