|
Posted by "Daevid Vincent" on 08/26/05 22:52
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.
Navigation:
[Reply to this message]
|