level 1
据用户手册所知thinkphp里同一级['_complex']只能定义一次,那如何用定义同一级两个并存的复合查询,例如下面的查询条件用thinkphp如何定义呢?
where (((id = 1 or id = 2 or id = 3) and type = 1) or ((id = 4 or id = 5 or id = 6) and (type = 2 or type = 3 or type = 4))) and status = 1
最终我想得到 where($condition), $condition该如何定义?
2012年09月24日 08点09分
1
level 3
你直接把那个SQL语句的条件定义给
$condition就好了,还有了,你那个SQL语句没问题吧id=1这样的最好写成id='1'加个英文版单引号了
2012年11月02日 08点11分
5