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

Bug #4135 _build_condition() bug?
Submitted: 2005-04-13 08:31 UTC
From: mipo at amatrica dot lt Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.10 OS: Windows 2000
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 - 21 = ?

 
 [2005-04-13 08:31 UTC] mipo at amatrica dot lt
Description: ------------ If last line of _build_condition() reached wrong things happen. In my case I use mysql tinyint(1) as boolean. Line 2259 should be changed from: $this->whereAdd(" $kSql = ".intval($v)); to: $this->whereAdd(" $kSql = ".intval($this->$k)); I have found #2519 bug which says it is solved. But latest version from cvs doesn't solve my problem. Reproduce code: --------------- ini: [mytable1] ... myfield2 = 145 ... php: $do = &DB_DataObject::factory('mytable1'); $do->myfield2 = true; $do->find(); Expected result: ---------------- SELECT ... FROM mytable1 WHERE mytable1.myfield2 = 1 Actual result: -------------- SELECT ... FROM mytable1 WHERE mytable1.myfield2 = 145

Comments

 [2005-04-13 08:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!