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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With