I had found an data-pager instead of grid named: adodb-pager
from http://sourceforge.net/project/showfiles.php?group_id=42718
The ressoure is easy to use and include in FH3.
In my opinion is this a helpful tool to show and handle datapages from databases (mysql, oracle, MS Access etc.), until you will create a datagrid ???
WST
I enter data into pageable gridrows.
But also display a FormHandler's form to manage the entrys ( add / update / delete ).
This fh-Form is autogenerated from the table discription .....
I have developed a datagrid that works with FH3 and need someone to quality control/test it for me. The grid follows the dispayed record, ie if the record is 3rd on the 4th page of the grid, then OK.
The whole package is a 'starting block', ie you start with a MYSQL db and then DIO builds the whole app. "DIO" stands for "Do It Once".
Please respond if you are willing to help develop this app.
The datagrid shows AND SORTS on foreign key fields (unlike PEAR DB DBODO Structures Datagrid).
To initiate the app, all that you need to do is follow a few simple rules:
1. The first field in each table is an auto-increment field with a name of the table plus "_id", eg the first field in the table name "customer" is "customer_id". The next field in the "customer" dbase is "address_id" which is the primary key of the "address" table.
3. The DIO app automatically builds the relationships and in the grid shows the value of the foreign key fields. So when you sort on "Address" in the "Customer" table all is kosher.
Does that make sense? Anyhow, it works for me which after a 1000 or more lines of code Pear, DB, DBDO and Structures_Data_Grid didnt!
DIO still has a few minor bugs (mostly to do with js onclick events) so would appreciate any and all feedback.
Sorry Gene,
Also meant to add, that the DIO app searches and outputs to pdf and xls the entire dataset, not just the displayed dataset. Will need help if the user only wants to output a particular range of records.
Changed at 19 April 06 / 04:23
well, what looked like an easy week for me has turned busy. so I haven't had a chance to look at DIOgrid.
but I do have one question. the readme says
Quote
The first prerequisite is that all MYSQL tables MUST have the first field as the primary key. The primary key MUST be the same as the tablename with the addition of "_id"
The one thing that strikes me is the requirement that "The primary key MUST be the same as the tablename with the addition of "_id." That is going to be difficult. While the first field may in fact be the primary key and auto increment, it most assuredly won't be named "table_name_id." link_id, category_id, record_id, etc. but not "table_name_id."
for me, if that is a requirement, then the DIUgrrid would not work.
They have to be the same if you want to automatically generate the application. If your mysql table name is record, then the primary key needs to be record_id. The appbuilder has to have a way of associating the key with the table and differentiating between the primary and foreign keys.
If table name and PK are different, one thing to try is to manually write the linkdisplay and gridcolumn arrays (and the form pages). It may need some mods in other places too. This is totally untested.
Changed at 19 April 06 / 13:41
is there a way to have that info as a variable and put that info in configuration file?
with that limiting factor, I would almost never be able to use DIOgrid with any third party databases (unless I just got lucky and the author happened to follow your naming convention).
I developed a database application using FormHandler extensively. I use it to add and edit records. I used what I called a data dictionary where I defined the fields. It looks like
It's just software so anything is possible. I've put forward an idea. It works if you follow the guidelines. If your situation is different, then come forward with another solution to make DIO work.