Re: Re: re-order a sql result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Rees wrote:
""Ross"" <ross@xxxxxxxxxxxxx> wrote in message
news:D9.31.61486.D7A8BD24@xxxxxxxxxxxxxxx

I have a query

$query = "SELECT * FROM sheet1 WHERE '$filter' LIKE '$search_field%'"



Simply requery the database for each search. For example, this orders the
results by surname from a-z

 $query = "SELECT * FROM sheet1 WHERE '$filter' LIKE '$search_field%'
ORDER BY surname ASC";

If you don't want to re-query the information, some clever table sorting javascript-fu is available at http://www.brainjar.com/dhtml/tablesort/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux