Sort table by column and pagination

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

 



We have quite a complex product all written in PHP and our own mySQL
wrapper. We initially wanted to use smarty, but due to time constraints, we
couldn't re-write everything, so it never got implemented.

Two feature requests we get a lot are the ability to sort the tabular data
by column heading (click once for ascending and again for descending) and
the second is pagination.

I'd say I was expert level PHP coder.

Can anyone suggest some code to handle this kind of thing before I go
re-inventing the wheel? Something I can relatively easily retrofit into our
existing code. I'm trying to avoid re-writing everything to conform to some
new format or template or what have you. Maybe there's a PEAR class? I'd say
a good percentage (maybe 1/2) pull from the DB and generate the rows on the
fly that way. We've tried to migrate towards generating an array and then
iterating through that (separating presentation and logic), but for some of
our data, there's just so much it's not feasible, sometimes time is a factor
or else the pages are just legacy. So, ideally the solution should handle
both kinds of tables.

Our tables use our own style sheet. They have a roll-over tool tip for the
headings. They use alternating colors for the rows, with highlighting for
the row your mouse is on. Probably pretty standard fare.

-- 
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