|In function log_db_errors there is $error variable, which is correctly filled with mysqli_connect_errno(), but not showed anywhere in $message!|
Just add line: $message .= 'Error: '. $error .'<br />';
Small, probably typing error, take me almost 30min in testing this very nice class.
|2013-02-27 18:20:33 - In reply to message 1 from Miodrag Ninkovic|
|Great catch! I've made the adjustment and added the corrected file to the package.|
|2013-03-12 10:22:30 - In reply to message 2 from Bennett Stone|
|There are same error in the few functions:|
Query is not getting printed in the mail when there is some error in the query.
Sql query is passed to variable $query,
and then same variable is used for fetching the data.
$query = $this->link->query( $query);
If there is error ,then the resulted 'query' is getting overwrite and then
passed to function: log_db_errors ,
which in turns shows nothing.
|2013-03-12 14:18:30 - In reply to message 3 from neeraj gupta|
|There are more issues:|
Your insert function cannot be used for inserting string values as you are not appending single quotes(') while creating the value string.
The insert function creating string like:
insert into abc (id,name) values (12,neeraj);
which will give error.