]> git.donarmstrong.com Git - infobot.git/commitdiff
sqldebug clean up; forgot a return line for GetCol
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Sep 2000 11:43:19 +0000 (11:43 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 18 Sep 2000 11:43:19 +0000 (11:43 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@112 c11ca15a-4712-0410-83d8-924469b57eb5

src/db_mysql.pl

index 658e91400e938061496c008160c6cac8c7ee5eca..e8055569fba60964b27aa603b4530dec3a30e9d1 100644 (file)
@@ -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";
 }