SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 6.X perl-HTML-EP-0.2010-6.i386.rpm

lib::HTML::EP::EditTable

Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index 

NAME

HTML::EP::EditTable - An HTML::EP extension for editing a table via WWW 

SYNOPSIS

  <!-- Connect to the database --!>  <ep-database dsn="DBI:mysql:test">  <!-- Make HTML::EP edit your table: --!>  <ep-edittable-edit table=MyTable>
 

DESCRIPTION

It is quite usual that you make your database tables editable via aWWW frontend. Writing such a frontend should be fast and simple forboth the database administrator and the web designer.

HTML::EP::EditTable comes with a set of ready-to-use HTML files,suitable for an example table called Termine and an examplesubclass. Usually the Web designer just picks off the HTML filesand modifies them until they fit his design wishes. Then thedatabase administrator takes the files and usually just modifiesthe column names. If he wishes to add some private data checkingor similar things, he can do so by subclassing the HTML::EP::Edittableclass. 

AVAILABLE METHODS

  <ep-edittable-edit table=MyTable id=ID what-to-do=insert>
This method combines the following possibilities:
*
Selecting a record out of the table MyTable.
*
Inserting a new record into the table MyTable.
*
Updating a record in the table MyTable.
*
Deleting a record from the table MyTable.

What the method exactly does, depends on the value of theCGI variable what-to-do: This can be either empty,insert, update or delete.

If what-to-do is insert or update, then the methodwill first call the HTML::EP method ep-input. If the attributesdest, prefix and sqlquery, which this method expects, arenot set, then they will by default be set to MyTable, MyTable_and 1, respectively.

If what-to-do is insert, then the query

  INSERT INTO MyTable ($@MyTable->names$) VALUES ($@MyTable->values$)
will be executed. Likewise, the query

  UPDATE MyTable SET $@MyTable->update WHERE ID = $cgi->ID$
will be executed for the value update.

If what-to-do is insert or delete, then the method willattempt to retrieve a row from the table MyTable. It does so,by looking at the column ID (default, you can overwrite thisby setting the attribute id when calling the method) and theCGI variable of the same name, which contains the column ID,usually the primary key of the table.

The fetched row will be converted into the same format returnedby ep-input: Thus you can always work with the same dataformat in all HTML pages. 

SEE ALSO

the HTML::EP(3) manpage, the DBIx::RecordSet(3) manpage


 

Index

NAME
SYNOPSIS
DESCRIPTION
AVAILABLE METHODS
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector