what is wrong with this code?
$msg_table = new MessageCenter_Db_Table_MsgctrMessages();
$msg_table->update(
array(
'folder_id' => self::FOLDER_TRASH
),
array(
$msg_table->getAdapter()->quoteInto('owner = ?', $this->_account->name),
$msg_table->getAdapter()->quoteInto('folder_id = ?', $id)
)
);
I receive an exception:
> SQLSTATE[07001]: <<Unknown error>>: -99999 [IBM][CLI Driver] CLI0100E
> Wrong number of parameters. SQLSTATE=07001
That exception comes up normally if not all of the ? in a query are replaced.
If i trace the exception i get this output :
[file] => /usr/share/php/Zend/Db/Adapter/Pdo/Abstract.php
[line] => 220
[function] => query
[class] => Zend_Db_Adapter_Abstract
[type] => ->
[args] => Array
(
[0] => UPDATE MSGCTR_MESSAGES SET folder_id = ? WHERE (owner = 'Gawalione') AND (folder_id = '6')
[1] => Array
(
[0] => 3
)
)
So this looks ok.
What is my failure?
ZF 1.6.2 on db2 9.5
pdo_ibm 1.2.5
--
MfG, Christian Welzel
GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
没有评论:
发表评论