Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Generic Editing of Database Tables in Webpages

by arunhorne (Pilgrim)
on Nov 08, 2005 at 11:08 UTC ( [id://506778]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

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

Hi

I have a MySQL database table containing a set of parameters used by our build deployment system. From time to time it becomes necessary to add, delete or ammend rows in the parameter table

We would like to create a web page to administer this functionality. I could easily create such a webpage based around iteration over DBI query to display parameters etc etc. However I got thinking and figured this must be a fairly common requirement to want to provide this sort of 'front-end' to a table. All of the searches however that I tried against CPAN etc came back with too many results to be useful.

As you have probably guessed my question is, what is the best way to do this given the points below. I can't believe no one has encountered this problem before, I just can't find any evidence!

  • There are a number of tables I would like to expose in this way (i.e. ad hoc solution not ideal)
  • Ideally the table view would be read only until a given row was selected for editing, i.e. I don't want to just display a massive grid of input boxes
  • Slightly further down the line there will be a requirement to bind column values into a combo box. Any module possesing suitable abilities would be preferable should there be a choice
  • As always we are very limited in time, so a simple/lightweight framework is preferable to a full scale M-V-C one for simplicity

Thanks in anticipation

____________
Arun
  • Comment on Generic Editing of Database Tables in Webpages

Replies are listed 'Best First'.
Re: Generic Editing of Database Tables in Webpages
by marto (Cardinal) on Nov 08, 2005 at 11:18 UTC
    Hi arunhorne,

    You have not told us what Database system you are using?
    Have a look at the Maypole and catalyst frameworks which should get you started quickly.

    Hope this helps.

    Martin

      For the record, Catalyst & Maypole are Perl ports of the Ruby on Rails idea.

      I haven't used Ruby myself, but a friend of mine swears by it, and this tutorial showing how to do exactly the kind of task you describe certantly makes it look easy.

      Update: I stand corrected. I (like many developers, I suspect) had never heard of Maypole until I went looking for a Perl version of RoR, and most references I saw described it as exactly that.


      Xaositect - Whitepages.com
        For the record, they are no ports. *cough*
        For the record, Catalyst & Maypole are Perl ports of the Ruby on Rails idea.

        Except that they're not.

        Maypole was out for some time before Rails hit the streets. Indeed there was a perl.com article on it before Rails was out ;-)

        Catalyst has certainly stolen some stuff from Rails, but it's as much an evolution of Maypole as it is a version of Rails.

        (Not that Rails isn't an excellent little framework - and Ruby an excellent language :-)

Re: Generic Editing of Database Tables in Webpages
by davidrw (Prior) on Nov 08, 2005 at 11:34 UTC
    It's not perl, but i do strongly recommend phpMyAdmin -- you should be able to basically just drop it in (assuming you can run php) and be good to go. This is, however, solely an admin solution -- gives the user full reign to the data and schema.

    For restricting access to specifc actions (e.g. updates only) and/or specific tables, I have successfully (and very quickly) used phpMyEdit
Re: Generic Editing of Database Tables in Webpages
by pboin (Deacon) on Nov 08, 2005 at 13:15 UTC

    You might want to wander over to CPAN and check out: HTML::DBForm.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://506778]
Approved by marto
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.