I have a perl->DBI->MySQL database app. that handles everything from my 
order entry to my accounts payable.  I am in the process of cleaning up 
a lot of the code I've written to make it easier to maintain.  I 
probably use the following DBI staement handle about fifty different 
places on different tables:

use DBI;
my $dbh = 
DBI->connect("DBI:mysql:database=operations;192.128.0.1","abuser","whisky");
my $q = "INSERT into table (column, column, column, column) VALUES (?, 
?, ?, ?)";
my $sth = $dbh->prepare($q);
$sth->execute($val1, $val2, $val3, $val4);

Would it be best to create a class called INSERT that all scripts call 
when they need to insert create a new record in a table?

Richard


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to