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.
| [reply] |