http://www.perlmonks.org?node_id=559708

Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:

I need to produce HTML forms for a client to use to manage their MySQL database.

Is there any interface-to-database Perl module that will automate things like the creation of HTML forms from MySQL records, for simple C.R.U.D. operations?

I'm considering just doing a quick "describe table" before opening a form for the record and creating form fields based on the results, that is, if it's a VARCHAR, make an INPUT field for it, if it's a TEXT, make a TEXTAREA field for it, if it's an auto-incrementing primary key field make it into a hidden field and so on. The UPDATE or INSERT that happens when you save would just be a list of fields and values from CGI params, etc.

It wouldn't be terribly hard to write myself, but surely someone's created this kind of thing already?

I've had a look at CPAN and can't find anything that seems right.



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

Replies are listed 'Best First'.
Re: HTML interfaces for editing SQL
by perl_lover (Chaplain) on Jul 07, 2006 at 03:49 UTC
    phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats and is available in 50 languages

      I haven't tested it yet, but there is also an PerlMyAdmin...
Re: HTML interfaces for editing SQL
by jbisbee (Pilgrim) on Jul 07, 2006 at 03:56 UTC
    Not sure if you've looked at Catalyst of not, but there is a good updated scaffolding demo with DBIx and MySQL on the Catalyst wiki.

    Also if you want to see the outdated screencast (to get an idea how easy it is) you can see it here (mirror 1, 2, 3)

    -biz-