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]