[英]codeigniter active record db query
我需要一個看起來像這樣的查詢:
select * from table where id=5 and (eid = 1 or eid = 2 or eid = 10)
我試過了
$this->db->select()->from(MEMB_EVENTS);
$this->db->where('mID', $mID);
用各種手段where
or_where
get_where
並沒有運氣形成類似上述需要希望有人能對受一些啟發,我查詢
我想你可以通過使用像這樣的東西來做到這一點
$this->db->select()->from(MEMB_EVENTS);
$this->db->where('mID', $mID);
$this->db->where("(eid='1' OR eid='2' OR eid='10')", NULL, FALSE);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.