Database efficiency improvements.
This commit is contained in:
parent
547e10affd
commit
f0ebc98582
12 changed files with 100 additions and 52 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue