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

Bug #13694 escaping is not working in some cases
Submitted: 2008-04-16 14:35 UTC
From: paveld Assigned: quipo
Status: Closed Package: MDB_QueryTool (version 1.2.2)
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 : 16 - 8 = ?

 
 [2008-04-16 14:35 UTC] paveld (Pavel Dobes)
Description: ------------ I'm not able to query: SELECT sum( a ) AS suma , count( CAST( b AS DATE ) ) AS dateb, CAST( b AS DATE ) AS datebgb FROM `tablea` GROUP BY datebgb Test script: --------------- $db->setSelect('sum( a ) AS suma, count( CAST ( b AS DATE ) ) AS dateb, CAST( b AS DATE) AS datebgb'); $db->setGroup('datebgb'); $db->getAll(); Expected result: ---------------- expedting result array Actual result: -------------- false, $db->->getQueryString() return wrong query string: SELECT sum( a ) AS `suma`,count( CAST ( b AS `DATE ) )` AS dateb, CAST( b AS `DATE)` AS datebgb FROM `tablea` GROUP BY datebgb The addng `` staff works wrong

Comments

 [2008-04-16 14:54 UTC] paveld (Pavel Dobes)
this will slove the prblem: $db->setOption('raw',true); Pavel
 [2008-04-20 15:28 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.