[英]Zend DB - where And Or Query
有人可以告訴我Zend DB查詢代表最后一行的正確語法( and (xxx or xxx)
...
where
id = 1241487470
and (contract=0 or is_work IS NOT NULL)
...
我被困在這里:
->where('id = ?', 1241487470)
->where(...)
這似乎合乎邏輯且可行。 好耶
->where('id = ?', 1241487470)
->where('contract= ? or is_work IS NOT NULL)
這似乎也可以工作並保留zend db擒縱系統
->where('id = ?', 1241487470);
->where('(contract = ?', 0);
->orWhere('is_work IS NOT NULL)');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.