【www.bbyears.com--thinkphp】
sql语句:
代码如下 #查询sql语句select count(sid) as count,TRUNCATE(income/installnum,2) as price from think_info where (TRUNCATE(income/installnum,2)>=0.2 and pay_type=2 and user_type=0) or (user_type=0 and installnum=0)
当sql语句中有很多and和or的时候,要注意and和or的优先级,可以加上括号以区分。