Hi,
I submitted, it seems to me, an important bug in the issue tracker a year
ago regarding Zend_Db_Table_Abstract
Please read below :
Hi,
When inserting or fetching in a DB,
the where condition must be of the following syntax (when using an array):
$where = array(
'id_photo = ?' => $pic,
'member_id = ?' => $memberId
);
But when updating, the above where condition will generate a wrong Sql,
so you'll need to apply another syntax , like this one:
(get the dbAdapter $db first)
$where = array(
$db->quoteInto('id_photo = ?', $pic),
$db->quoteInto('member_id = ?', $memberId)
);
Indeed, if you do an "update" or "delete" with a simple array as you would
use for fetchAll or fetchRow like ->update(array("id = ?", $id), $data); or
->delete(array("id = ?", $id)); your whole table will be messed up !!
I conclude that no one are using those methods and that they have never been
tested ?
--
View this message in context:
http://www.nabble.com/No-one-must-be-using-Zend_Db_Table_Abstract---tp24443437p24443437.html
Sent from the Zend Framework mailing list archive at Nabble.com.