|
Posted by Markku Niskanen on 07/25/05 10:26
>I have an array of 500 elements, where each element is a hash with the
>firstname, lastname, address, favorite color, etc of a given person. I
>want to display the first 25 rows in a table, and then have a button/link
>that says "next 25 rows"; the second page would display rows 26-50 with
>buttons/links for "previous 25 rows" and "next 25 rows".
We have written a PHP Class that handles things like this. It is
a pure PHP4 class and can retrieve data from any SELECT statement
and also creates links to edit/delete/view forms. Sortable columns
should also work as well as dropdown selects for filtering the data.
There are half a dozen of different formats for showing the data
(text,image,date,time...). If one of them is not sufficient there is a
"callback" data type that can format the data in a function.
We do not yet have hide/unhide columns as they have not been
considered necesary but this looks interesting, though and could
actually be added in a couple of hours.
We have written almost 200 applications using this and other in-house
classes. It is a combination of a PHP browse class and a template that
basically just displays the data. The two most important add-in
classes we have written are an EditClass and a SaveClass that handle
the form(s) and the database update/insert/delete.
Sorry to say it has a lot of in-house code that make it impossible to
publish it as such. I have had in mind to publish the core parts and I
will probably start it after my holidays.
As for your question about the amount of work: It took me only a
three-four weeks to create the first working prototype but the
additional features took several weeks to add and we are still adding
new features to the set of templates/classes.
As for my holidays: I am planning to make a trip to Dublin, Scotland
and the Lake District in early August. Any fellow Smartians out there
in that region?
Navigation:
[Reply to this message]
|