PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2 » Bug #7671

Problem with autoExecute statement - missing grave accent

Details

Request #7671Problem with autoExecute statement - missing grave accent
Submitted2006-05-19 12:47 UTC
Fromsteve at overlee dot com
Assignedlsmith
StatusClosed
PackageMDB2
PHP Version4.4.2
OSWindows XP
Roadmaps(Not assigned)

Comments

[2006-05-19 12:47 UTC] steve at overlee dot com

Description:
------------
When using autoExecute with mysql 5.0.18 I get the following syntax error:

Error: INSERT INTO h_doors (name,type,handing,finish,manufacturer,condition,serial_no,comments,workorder_id,next_service,id) VALUES ('Door 1','Swing','LH Push','Clear','Hunter','Good','3weqwe','sdsa','3','2006-05-19',1) [nativecode=1064 ** 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 'condition,serial_no,comments,workorder_id,next_service,id) VALUE]

PHP CODE
$database->autoExecute($this->table, $data, DB_AUTOQUERY_INSERT);

autoExecute is not producing the correct syntax. It should surround the field names with grave accents (`)

[2006-05-19 13:16 UTC] steve at overlee dot com

Is is possible to specify the quote identifier on autoExecute? If so how is this done? Or will have I have to do manual execute?