Hello there, Thanks a lot. The Javascript class worked like a charm. I'm glad I asked! :) Thanks for all the answers, everyone. I seem to have communicated my intent wrong, when it came to my algorithm, but basically, yes, it was not based on the MVC model, and yes, it did filter the SQL table, then sorted them and displayed each row according to the ID, for example, of the different things in the SQL table. In other words, let's say that I wanted to get the ID, sort the array containing the ID's, then show the rows of the table by looping through the array and showing each row of the table. However, the javascript did what I wanted perfectly anyway. I have to read up more on Javascript since I seem to have an awful understanding of it, but for now... *phew* hehe! -- --- Contact info: Skype: parham-d MSN: fire_lizard16 at hotmail dot com GoogleTalk: parham90@xxxxxxxxx Twitter: PD90 email: parham90 at GMail dot com "Jim Lucas" <lists@xxxxxxxxx> wrote in message news:4AADEC1E.60000@xxxxxxxxxxxx > Parham Doustdar wrote: >> Hello there, >> I've been asked to create something like the tables you usually see, >> where the headers are actually links and when you click the links, the >> table gets sorted based on the header. Are there any classes that you >> know of that would do the job? My current idea is to return an array of >> the colomn which contains the data you want to sort on (like 'name') then >> sort the array and do something like: >> [code] >> for (i = 0; i < length(array); i++) >> mysql_query("select * from table where 'name' = ${aray[i]}"); >> [/code] >> Any better algorithms anyone? >> Thanks! > > My suggestion would be to have the client do it. > > http://www.js-vault.us/iscripts/007.html > > I use it on a number of different pages. > -- > Jim Lucas > > "Some men are born to greatness, some achieve greatness, > and some have greatness thrust upon them." > > Twelfth Night, Act II, Scene V > by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php