Re: Class to select/insert/delete/update

2004-06-24 Thread LRMK
g and unlocking, commiting and rollbacking That approach will minimize the SQL that you have to write when you use databases LRMK - Original Message - From: "Rod Za" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 25, 2004 3:04 AM Subject: Class t

Re: Class to select/insert/delete/update

2004-06-24 Thread Wiggins d Anconia
> Hello, > > i'm trying to make a class to do select/insert/delete/update on a MySQL table (via DBI). > this is a snip of code: > You haven't really shown us a class, just a method... > sub query{ > my $self = shift; > my($sql) = @_; > my @result; Why scope @result here

Class to select/insert/delete/update

2004-06-24 Thread Rod Za
Hello, i'm trying to make a class to do select/insert/delete/update on a MySQL table (via DBI). this is a snip of code: sub query{ my $self = shift; my($sql) = @_; my @result; my $sth = $self->{dbh}->prepare($sql) or return undef; if($sql =~ /delete|insert