【发布时间】:2012-03-22 21:55:08
【问题描述】:
在 Kohana 中,我是否可以轻松地否定嵌套布尔集?
SELECT * FROM table WHERE NOT ( (id = 1 OR name like 'bob') and col2 = 333 )
我得到了这个代码...
$db->and_where(col2, 333)
->and_where_open()
->or_where(id, 1)
->or_where(name, bob)
->and_where_close
生成
SELECT * FROM table WHERE (id = 1 OR name like 'bob') and col2 = 333
我如何将所有这些东西包装在 NOT 中?
【问题讨论】:
标签: php kohana kohana-3 kohana-orm