Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以告诉我 Zend DB 查询表示最后一行的正确语法(and (xxx or xxx)
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)');