From: dms Date: Mon, 18 Sep 2000 11:43:19 +0000 (+0000) Subject: sqldebug clean up; forgot a return line for GetCol X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=78516dd858bf4d1cad533d4bbd9a2af1165f93e4;p=infobot.git sqldebug clean up; forgot a return line for GetCol git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@112 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/db_mysql.pl b/blootbot/src/db_mysql.pl index 658e914..e805556 100644 --- a/blootbot/src/db_mysql.pl +++ b/blootbot/src/db_mysql.pl @@ -58,7 +58,6 @@ sub dbGet { if (!$sth->execute) { &ERROR("Get => '$query'"); &ERROR("Get => $DBI::errstr"); - &SQLDebug($DBI::errstr); return; } @@ -86,7 +85,8 @@ sub dbGetCol { &SQLDebug($query); if (!$sth->execute) { &ERROR("GetCol => '$query'"); - &SQLDebug($DBI::errstr); + &ERROR("GetCol => $DBI::errstr"); + return; } if (defined $type and $type == 1) { @@ -117,7 +117,7 @@ sub dbGetRowInfo { &SQLDebug($query); if (!$sth->execute) { &ERROR("GRI => '$query'"); - &SQLDebug($DBI::errstr); + &ERROR("GRI => $DBI::errstr"); } my @cols; @@ -223,7 +223,6 @@ sub dbRaw { if (!$sth->execute) { &ERROR("Raw($prefix): => '$query'"); &ERROR("Raw($prefix): $DBI::errstr"); - &SQLDebug($DBI::errstr); return 0; } @@ -366,6 +365,8 @@ sub delFactoid { sub SQLDebug { return unless (&IsParam("SQLDebug")); + return if (!fileno SQLDEBUG); + print SQLDEBUG $_[0]."\n"; }