]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Add a directive sql_debug. Add debuging statements in the sql library
authorkkalev <kkalev>
Sat, 11 Jan 2003 16:53:06 +0000 (16:53 +0000)
committerkkalev <kkalev>
Sat, 11 Jan 2003 16:53:06 +0000 (16:53 +0000)
Changelog
lib/sql/drivers/mysql/functions.php3

index 8456889edadec45f0cf0c2e7e313e83340582210..d0704b355909f0436c5bd716aeee6ea046474212 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -24,6 +24,7 @@ Ver 1.62:
 * In log_badlogins create a separate sql input file for each sql server and append sql commands to it. If the
   sql command succeeds we delete the corresponding input file. That way if an sql server is down we store the
   accounting info in the input file and then send it all when it comes back up.
+* Add a directive sql_debug. Add debuging statements in the sql library
 Ver 1.61:
 * Add a string encoder for greek
 * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
index 1097a98f64b64dd06cf473be711d47143dbbeccc..e558f2c0a5d83920c70fd24cbd1ef9c7f8a6b4c0 100644 (file)
@@ -27,21 +27,32 @@ function da_sql_close($link,$config)
 
 function da_sql_query($link,$config,$query)
 {
+       if ($config[sql_debug] == 'true')
+               print "<b>DEBUG(SQL,MYSQL DRIVER): Query: $query</b><br>\n";
        return @mysql_db_query($config[sql_database],$query,$link);
 }
 
 function da_sql_num_rows($result,$config)
 {
+       if ($config[sql_debug] == 'true')
+               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Num rows:: " . @mysql_num_rows($result) . "</b><br>\n";
        return @mysql_num_rows($result);
 }
 
 function da_sql_fetch_array($result,$config)
 {
+       if ($config[sql_debug] == 'true'){
+               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: ";
+               print_r(@mysql_fetch_array($result));
+               print "</b><br>\n";
+       }
        return @mysql_fetch_array($result);
 }
 
 function da_sql_affected_rows($link,$result,$config)
 {
+       if ($config[sql_debug] == 'true')
+               print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: Affected rows:: " . @mysql_affected_rows($result) . "</b><br>\n";
        return @mysql_affected_rows($link);
 }