Forum Moderators: open

Message Too Old, No Replies

autogenerate update/insert form from mysql database?

         

weemel

7:52 am on Nov 3, 2008 (gmt 0)

10+ Year Member



Does anyone know of any kind of system that can generate an update/insert/delete form (web-based or otherwise) from a mysql database that incorporates data from multiple tables that are linked by foreign keys? For example, a database with the following tables:


Table animals:
id name species
1 cookie 1
2 james 2
3 max 2

Table species:
id name
1 rabbit
2 dog

would produce a form/s that allows
1) editing the species table
2) editing the animals table whereby you're given the option to either enter an existing species (via a select box or similar) or create a new one.

Am thinking that the foreign keys could be detected (if using InnoDB) or configured at the start (if using MyISam)

Someone must have come up with something like this & more complicated by now but i can't seem to find one, or i'm looking in the wrong places...

Any suggestions appreciated!

ZydoSEO

1:36 pm on Nov 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you try Googling "mysql forms generator". I see lots of results that look promising.

physics

12:40 am on Nov 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure if this is what you want but you may be able to use phpmyadmin:

Now, if you try inserting some data into the branches table, phpMyAdmin will, instead of allowing you free-form entry into the cid field, provide you with a drop-down selection list of all the cname values from the clients table, thus making it impossible for you to enter an incorrect or non-existent client ID.

[devshed.com...]