If I understand you correctly, you wish the universal CGI script, which is able to update (and insert or delete?) records into different db tables and is able to provide various html GUI (forms with inputs logically related with db columns)?
I am not experienced with CGI and MySQL, so I don't know, if some free codes are available on the Net - I work under pure mod_perl against PostgreSQL. But I can imagine some generic script using configuration file. I guess that the configuration must be very declarative, to describe tables, their columns, what can be edited under some conditions, etc. And I don't know, if
it is effective for you to develop generic script and write amounts of configurations after that...
I typically write one subroutine for one editor (== one html page), which calls generic subroutines, symbolically sub getHTTPQuery($request), sub doSql($dbh, $sql, $binds), sub sql2xml($dbh, $sql, $binds), sub responseFromXslt($xml,$xsl). This editor's subroutine realizes application logic: analyzes query pieces, does proper sql's, chooses proper xsl templates, does xslt transformation and returns it's html output. Some of them can be stored in configuration file, some of them can be hardcoded. My experience is that real requirements are too various and it is not effective to develop generalized editor subroutine.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.