mdb2 autoexec
| From: | Mark Steudel | Date: | Thu, 06 Jul 2006 18:40:54 +0000 |
| Subject: | mdb2 autoexec | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24582@lists.php.net to get a copy of this message | ||
I'm having problems doing a autoexecute in mdb2.
Here's my error:
DBMS/Debug Message: _doQuery: Could not execute statement[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
'long, gmt, daylight) VALUES (?, ?, ?, ?, ?)' at line 1]
MDB2 Error: syntax error line: 27
This is the values of $field_values
Array
(
[zipcode] => 00501
[lat] => 40.922326
[long] => -72.637078
[gmt] => -5
[daylight] => 1
)
// this is my code
$field_values['zipcode'] = $eLine['0'];
$field_values['lat'] = $eLine['1'];
$field_values['long'] = $eLine['2'];
$field_values['gmt'] = $eLine['3'];
$field_values['daylight'] = $eLine['4'];
$sth =& $db->extended->autoExecute('geo_coder', $field_values );
mysqlErrorCheck($sth, __LINE__ );
I also tried
$sth =& $db->extended->autoExecute('geo_coder', $field_values,
MDB2_AUTOQUERY_INSERT );
And
$type = array( 'integer', 'float', 'float', 'integer',
'integer' );
$sth =& $db->extended->autoExecute('geo_coder', $field_values,
DB2_AUTOQUERY_INSERT, null, $type );
Thanks, Mark
-----------------------------------------
Mark Steudel
NetRiver
Web and Application Developer
555 Dayton St.
Suite A
Edmonds, WA 98020
w: http://www.netriver.net
p: 425.741.7014