* 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
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);
}