On 07/11/2011 01:47, elodie wrote:
Hi all
I would appreciate if someone could explain what the following command
does:
$sth->execute;
I would also like to know what the following command does:
$sth->errstr;
Thanks in advance
It looks like the code is using the DBI (Database Interface) module. The
$sth variable is a statement handle which corresponds to an SQL
statement. It must first be prepared, something like this
my $sth = $dbh->prepare('select * from table');
and can then be executed with
$sth->execute;
If there has been an error, then $sth->errstr will return the message
text describing the error.
For more information on the DBI module take a look at
perldoc DBI
or on line at
<http://dbi.perl.org/docs/>
HTH,
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/