Zend Framework: How to delete a table row where multiple things are true?
zend-db, zend-db-table, zend-framework
Solution
To extend on Jason W's answer:
Not exactly sure what the 3rd section is saying
That means you can do this:
$db->delete('tablename', array(
'first_id = ?' => $first_id,
'second_id = ?' => $second_id
));
And the adapter will quote everything for you.
I don't feel like the documentation is very clear though.
Problem
Normally, this would work for me: ``` $db = Zend_Db_Table::getDefaultAdapter(); $where = $db->quoteInto('id = ?', $id); $db->delete('tablename', $where); ``` but I have to match two ids. So I don't really know how to structure it. ``` WHERE first_id = 'id1' AND second_id = 'id2' ``` So how do I do this with the Zend Framework?