|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-04-19 03:22 UTC] abhargav at in dot ibm dot com
[2011-04-21 12:44 UTC] gawain at camlann dot de
[2011-09-02 04:58 UTC] abhargav at in dot ibm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
Description: ------------ While trying to delete some rows with ZF i noticed, that the rows did not get deleted. The Sql is this DELETE FROM EVENTQUEUE_EVENTS WHERE (time = '2011-04-18 20:20:03.000000') AND (callback_class = 'DomainModel_AccountCallback') AND (callback_method = 'handleDeletionCallback') AND (callback_params = 'a:1:{s:8:\"username\";s:9:\"Gawalione\";}') The Sql is build using the ZF quoteInto() which in turn uses PDO::quote() to do the job. As you can see in the above statement, the PDO::quote() returns the value for callback_params enclosed in ' but also quotes " as \". This causes db2 to not find any matching rows and therefore it does nothing... Reproduce code: --------------- $table->getAdapter()->quoteInto('callback_params = ?', serialize(array('username'=>'Gawalione'))); Expected result: ---------------- callback_params = 'a:1:{s:8:"username";s:9:"Gawalione";}' Actual result: -------------- callback_params = 'a:1:{s:8:\"username\";s:9:\"Gawalione\";}'