Database efficiency improvements.

This commit is contained in:
JT Smith 2002-12-11 05:45:04 +00:00
parent 547e10affd
commit f0ebc98582
12 changed files with 100 additions and 52 deletions

View file

@ -307,6 +307,9 @@ sub new {
$class = shift;
$sql = shift;
$dbh = shift || $WebGUI::Session::session{dbh};
if ($WebGUI::Session::session{setting}{showDebug}) {
push(@{$WebGUI::Session::session{SQLquery}},$sql);
}
$sth = $dbh->prepare($sql) or WebGUI::ErrorHandler::fatalError("Couldn't prepare statement: ".$sql." : ". DBI->errstr);
$sth->execute or WebGUI::ErrorHandler::fatalError("Couldn't execute statement: ".$sql." : ". DBI->errstr);
bless ({_sth => $sth}, $class);