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

Bug #10195 Identifiers quoting problem
Submitted: 2007-02-26 18:19 UTC
From: ioz at ionosfera dot com Assigned: ifeghali
Status: Closed Package: MDB2_Schema (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-02-26 18:19 UTC] ioz at ionosfera dot com (IoZ)
Description: ------------ In most functions table names are quoted, but it must be necesary to quote column names also, because errors can appear when using DBMS reserved words as column names. For example, the function dumpDatabase fails when using 'value' as the column name of a table with MySQL.

Comments

 [2007-02-27 02:48 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!
 [2007-02-27 12:31 UTC] ioz at ionosfera dot com
Sorry, the column name that failed was 'option', and not 'value'. You can reproduce the error using the following table: CREATE TABLE `Packages` ( `id` int(10) unsigned NOT NULL auto_increment, `option` varchar(128) NOT NULL, `summary` varchar(255) default NULL, `creation` datetime default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5; INSERT INTO `packages` VALUES (5, 'test1', 'summary1', '2007-02-15 13:11:32'); I have MySQL version 5.0.20 and when I dump that table with the "example.php" file, I get the following error: * MDB2 Error: syntax error _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT id, option, summary, creation FROM `packages`] [Native code: 1064] [Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option, summary, creation FROM `packages`' at line 1]
 [2007-02-27 23:26 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!