Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #642 can't perform count if there's an null field
Submitted: 2004-01-29 16:37 UTC
From: maka3d at yahoo dot com dot br Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 25 = ?

 
 [2004-01-29 16:37 UTC] maka3d at yahoo dot com dot br
Description: ------------ $user = DB_DataObject::factory('Users'); $user->nome = "Mary"; echo $u->count(); // WORKS require_once 'DB/DataObject/Cast.php'; $user->email = DB_DataObject_Cast::sql('NULL'); echo $user->count(); // DOES NOT WORS Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /usr/local/share/pear/DB/mysql.php on line 653

Comments

 [2004-01-30 00:36 UTC] alan_k
ouch :) - I'll look at it over the weekend.. - If you can get xdebug running a backtrace from that would save a bit of time Regards Alan
 [2004-02-02 07:35 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. let me know if it works Thanks Alan