MDB2 Help
Posted: Sun Oct 07, 2007 6:56 pm
I couldn't get any help on the PEAR forums (as expected) so that's why I'm hoping someone here can help.
I'm trying to use prepared statements but I have no idea what's going wrong. Here is the code that fails:
And the code that sets the $this->sql array:
The code is returning a PEAR Error and when I get the debug info this is what I get:
I have no idea what is happening. What is Object id #42? As far as I know I never even gave any objects, just a string and an array as should be given. Does anyone have any idea what I might be doing wrong? Any help is greatly appreciated (As I am totally lost). Thanks.
I'm trying to use prepared statements but I have no idea what's going wrong. Here is the code that fails:
Code: Select all
$test = $this->mysql->prepare($this->sql['sel_char_name'][0], $this->sql['sel_char_name'][1], MDB2_PREPARE_RESULT);Code: Select all
$sql['sel_char_name'] = array("SELECT * FROM `characters` WHERE `name` = ?", array("text"));Code: Select all
MESSAGE: _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE MDB2_STATEMENT_mysql_fb77ee68d9e6360a6039a25d02b31489 FROM Object id #42]
[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 'Object id #42' at line 1]