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)    

 [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


 [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 by the end of next Sunday (CET). If this was a problem with the 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.