Reply to Sort table by column and pagination

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация