List:General Discussion« Previous MessageNext Message »
From:Richard Reina Date:September 10 2001 5:47pm
Subject:Perl MySQL OO design question
View as plain text  
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 = 
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?


Perl MySQL OO design questionRichard Reina10 Sep
  • Re: Perl MySQL OO design questionBill TQO Adams10 Sep