Re: [phplib] How to sort data records in a table by their different fields? From: HDwebdev (maillist <email protected>)
Date: 06/24/01

On Sun, 24 Jun 2001 15:35:31 EDT, wrote:

>Hello,
>
>I have a table in html with the following fields: ‚name' ‚price' ‚first
>contact'. This table is a result of a mysql database query (over a
>php-script). This table in html has a lot of data records. Now I want to
>sort/ classify this data records by their name or price or first contact. I
>know that there exist a solution with the javascript language, there is a
>sort-button where you can choose between the different classification
>possibilities, ‚name', price or first contact. Anybody knows a solution?

It's usually best to do the sorting with the sql query (order by tablename) rather than with php.

Have each button trigger a different sort column is what I would suggest.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>