2 つの条件がある場合に、Zend フレームワークを使用して mysql で行を削除する方法の例を教えてもらえますか?
すなわち:(これをしようとしている)
"DELETE FROM messages WHERE message_id = 1 AND user_id = 2"
私のコード(惨めに失敗しているのは次のようになります)
// is this our message?
$condition = array(
'message_id = ' => $messageId,
'profile_id = ' => $userId
);
$n = $db->delete('messages', $condition);