From 4654229b202f77683bdd686e8036aa01f2db29ed Mon Sep 17 00:00:00 2001 From: dms Date: Mon, 18 Sep 2000 11:43:19 +0000 Subject: [PATCH] sqldebug clean up; forgot a return line for GetCol git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@112 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/db_mysql.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/db_mysql.pl b/src/db_mysql.pl index 658e914..e805556 100644 --- a/src/db_mysql.pl +++ b/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"; } -- 2.39.5