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

Bug #8309 Error on SHOW statement
Submitted: 2006-07-27 15:57 UTC
From: mr dot lobach at gmail dot com Assigned: lsmith
Status: Closed Package: MDB2 (version 2.2.0)
PHP Version: 5.1.4 OS: gentoo
Roadmaps: (Not assigned)    
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:
Solve the problem : 32 - 24 = ?

 [2006-07-27 15:57 UTC] mr dot lobach at gmail dot com (evgeny lobach)
Description: ------------ I'm using mysql database. If table's name one of reserved words, some methods return errors. Such tables need escaping apostrophes. For example, SHOW COLUMNS FROM `order`; List of methods which fixing: MDB2_Driver_Manager_mysql::listTableFields MDB2_Driver_Manager_mysql::listTableIndexes MDB2_Driver_Manager_mysql::listTableConstraints MDB2_Driver_Reverse_mysql::getTableFieldDefinition MDB2_Driver_Reverse_mysql::getTableIndexDefinition MDB2_Driver_Reverse_mysql::getTableConstraintDefinition Or another choice escaping into DB2_Driver_Manager_mysql::listTables Sorry for my bad english. Thaks


 [2006-07-27 16:03 UTC] lsmith (Lukas Smith)
please enable the quote_identifiers option: $mdb2->setOption('quote_identifier', true);
 [2006-07-28 07:13 UTC] mr dot lobach at gmail dot com
quote_identifier was enabled. It's result: MDB2_Error [message] => MDB2 Error: syntax error [userinfo] => _doQuery: [Error message: Could not execute statement] [Last query: SHOW COLUMNS FROM order LIKE 'orderid'] [Native code: 1064] Table's name not escaped.
 [2006-07-30 19:20 UTC] lsmith (Lukas Smith)
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.