Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Generator for MySQL
Old 09-03-2008, 11:02 AM PHP Generator for MySQL
Junior Talker

Posts: 3
Name: Tom
Trades: 0
Hello All,

My first post, yippee! First, a little background ... I've been using PHP/MySQL since about 2000 and Perl since about 1997 (although Perl isn't used as much now). I've always created my PHP/MySQL web apps from scratch. However, I've recently been searching for a PHP generator that will produce insert, update, delete, view one, and view all code for MySQL tables. I've found several online (one by SQLMaestro which was ok) but the problem is that none of them account for the different relationships of tables and fields. Let's say you have a child table, tblchild(my_id, my_loc), which has a foreign key, my_id, which is simply a number that references the parent table, tblparent(my_id, my_name). When editing and viewing tblchild you want to see the my_name associated with my_id because just showing the number is useless. All generators I've tried simply do not handle these situations and just assume all fields are entered with simple text boxes. Basically, I should be able to specify how a field is displayed and stored (which may be two different values). So the $64,000 question is: does anyone know of such a generator? Thanks

-Tom
qwarktastic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-03-2008, 11:39 AM Re: PHP Generator for MySQL
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
I've coded a function to generate MySQL query's from Arrays and various strings of data. I'm sure you can find a class or something via google.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 09-03-2008, 12:04 PM Re: PHP Generator for MySQL
Junior Talker

Posts: 3
Name: Tom
Trades: 0
Hi Mike, I should have been more specific. I have my own database class that handles all the generation of insert/updates/deletes when given an array of fieldnames and values. What I would like is a program to automagically generate the form and program flow using parent/child relations. In other words right now I just create my forms manually from a base form, then modify it to suite the table (I need a combobox here with these values and associate it with this field, I need a checkbox here, etc.). I want to tell a program what input type should represent a specific field (combobox, checkbox, date, etc) and then it would generate all the form and flow.

Although it certainly could be a PHP web app, I was looking for a windows app (or java) that would generate the code. Thanks!

-Tom
qwarktastic is offline
Reply With Quote
View Public Profile
 
Old 09-03-2008, 12:38 PM Re: PHP Generator for MySQL
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Query the information schemata when you generate the queries. All of the object, including key relationships, expose their meta data through system tables.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-03-2008, 07:37 PM Re: PHP Generator for MySQL
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Take a look at the code behind PHPMyAdmin, it's a MySQL manager and it basically does what your describing above, i'm sure you could easily rip the code.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to PHP Generator for MySQL
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15097 seconds with 12 queries