Hi.
Can anyone see why i do not get any errors from the following perl code.
The documentation talks about using DO not EXECUTE, and also eval. I do not see why or how either of those approaches is significantly different to this.
Also adding an EVAL around the execute causes a syntax error.
Also i really don't understand why we have to eval a command to get information. Isn't eval going to add load to the script?
thanks.
Can anyone see why i do not get any errors from the following perl code.
Code:
my $dbh = DBI->connect ("DBI:mysql:webreq", "webreq", "webreq",{PrintError=> 1, RaiseError => 1}) || die "Can not connect : $DBI::errstr\n";
...
$sth = $dbh->prepare ("$sql") or die ("Can not prepare query : $dbh->errstr<BR>\n<br>");
...
$sth->execute() or die("ERROR!: " . $sth->errstr);
if($dbh->errstr){
print $dbh->errstr;
}else{
print "Record stored for ".$session_id ." on local mysql db";
}
The documentation talks about using DO not EXECUTE, and also eval. I do not see why or how either of those approaches is significantly different to this.
Also adding an EVAL around the execute causes a syntax error.
Also i really don't understand why we have to eval a command to get information. Isn't eval going to add load to the script?
thanks.