Chicharrón (Crackling?) # ezSql fails Insert «randomly» #
This entry talk about ezSql,
http://www.woyano.com/jv/ezsql
Before, thanks for that great library, i work whith ezsql for 3 years!
I found small bug, where you have multiple database conections and/or classes. I write an small module for Drupal.
In my module, $db->query($sql) returns false «randomly» where INSERT, however the insert works fine, after hours of debug my work ( days :$ ), found the «bug» in the line 212 of ez_sql_mysql.php .
$this->rows_affected = @mysql_affected_rows();
lack link identifier!, change the line to:
$this->rows_affected = @mysql_affected_rows($this->dbh);
And works fine.
Hope that it helps.
Cheers,
Jose A. Cely
http://www.woyano.com/view/213/Download-ezSQL-Database-Class-205#14556
Leave a comment