Simple From Generator accessing MySql

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am sure this has been answered in over whelming detail in this group,
however the search results have not turned up any thing I am interested

I want a simple form generator in PHP that accesses a Mysql database.

The program should (ideally in my opin):

Generate a form when given a database name and table.
Options for display only, insert new record, and edit.

This is for internal company use only.  So it does not have to look
terribly pretty.

Most of the form generators I have found require a considerable amount
of coding to display a form nearly equal to what writing a form from
scratch would require.

I am looking for something like:



$new_form= new form_line_generator();

$new_form->run_columns_query();         // get the db columns names
from db

I started writing my own, but I am out of time!

Re: Simple From Generator accessing MySql

Bob wrote:
Quoted text here. Click to load it
Cut for Brevity
Quoted text here. Click to load it

Try a Google for PHPClasses - there may or not be a be a space there

Hundreds of tools for forms and browsing

Have fun


Re: Simple From Generator accessing MySql

Bob wrote:

Quoted text here. Click to load it

We may have what you want.  We have a complete system generator that takes a
specification and builds a database and the web site to allow for
maintenance.  Security and automation are built in from the ground up.

In many cases there is no programming.  Here is a super-simple example of a
time-zone table.  We do not expect users to populate that table themselves,
so we populate a table like that for them:

TABLE,timezones,Time Zones,timezone,reference,risimple
COLINTAB,timezones,timezone,Time Zone,char,7,0,primary_key;uisearch
COLINTAB,timezones,timezone_hours,Offset Hours,int,0,0,uisearch
COLINTAB,timezones,timezone_mins,Offset Minutes,int,0,0,uisearch
COLINTAB,timezones,timezone_off,Computed Offset,
        EXTEND,(@timezone_hours * 60) + @timezone_mins
        (above 3 lines are actually one line)

NZDT,13,00,New Zealand Daylight-Saving Time,170
IDLE,12,00,International Date Line, East,180
NZST,12,00,New Zealand Standard Time,190
NZT,12,00,New Zealand Time,200
.....many more lines here :)

Note the line beginning with "PROJECT", this names a projection, or named
list of columns.  Whenever table timezones is used as a foreign key in
another table, the UI looks for the "dropdown" projection and if it finds
it it uses it to define a <SELECT> element for that column.  

The column "uisort" is used to sort things whose natural order makes no
sense to people.  So in a table of timezones you may want to force
"EST5EDT" to the top by giving it a vaue of zero in that table.

Quoted text here. Click to load it

Actually ours does not require any of this.  We build systems entirely based
upon database operations, and so we assume that all of this is routine and
nobody wants to be bothered with it.  You type the spec in notepad (or vim)
and feed it to the generator.  Then you log in and start doing your
inserts, updates, and so forth.

Quoted text here. Click to load it

Now for the gotchas.  The system builds PostgreSQL databases, not MySQL, and
we have no plans to target MySQL until they significantly upgrade its
abilities in the areas of triggers and query complexity.

Second is that the system, while it is very easy for us to use, has had no
effort made to make it usuable by anybody but those of us who created it
and use it.  It may take some effort to get you up to  speed, but you won't
have to worry about coding.

Finally, we believe it can only benefit us to have the system in use as
widely as possible, and so are happy to make easy terms (read: free) with
fellow developers who may wish to climb on board as early adopters.  

Kenneth Downs
Secure Data Software, Inc.

Re: Simple From Generator accessing MySql

Bob wrote:
Quoted text here. Click to load it

Although I haven't used it myself, you might want to check out the PEAR package
DB_Table :

It can generate PEAR HTML_QuickForm forms from your tables.

Another PEAR alternative is DB_DataObject_Formbuilder.

Site Timeline