0
我想使用多個地方()與Zends刪除(),但沒有發生.. !!!我們可以在Zends delete()中使用多個where子句嗎?
$where=array('id' => $id,'likedbyID' => $likedbyID);
$this->delete($where);
上述代碼寫在模型中。
請幫我.....
在此先感謝.....
我想使用多個地方()與Zends刪除(),但沒有發生.. !!!我們可以在Zends delete()中使用多個where子句嗎?
$where=array('id' => $id,'likedbyID' => $likedbyID);
$this->delete($where);
上述代碼寫在模型中。
請幫我.....
在此先感謝.....
從Zend的文檔:
由於表中刪除()方法來代理數據庫適配器delete()方法,參數也可以是SQL表達式的數組。使用AND運算符將表達式組合爲布爾項。
知道一切,你可以使用它像這樣:
$this->delete(
array(
'id = ?' => $id,
'likedbyID = ?' => $likedbyID,
)
);
Allso您可以使用>或<或IN或..操作符而不是=