thinkphp 3.2.3 where 语句数组

浏览:3234 发布日期:2016/10/08 分类:求助交流
在thinkphp3.2.3怎样将 where 1=1 and type = 1 and (name like ‘%$name%’ or title like '%$name%' or num = '$name')转换为thinkphp语句啊,
源生语句为SELECT
yb_activity_project.`name`,
yb_user.truename,
yb_order.*
FROM
yb_activity_project,
yb_user,
yb_order
WHERE
yb_activity_project.id = yb_order.goods_id
AND yb_order.user_id = yb_user.uid
AND (
yb_activity_project.NAME LIKE '%$title%'
OR yb_order.order_num = '$title'
OR yb_user.truename LIKE '%$title%'
)
但是AND (
yb_activity_project.NAME LIKE '%$title%'
OR yb_order.order_num = '$title'
OR yb_user.truename LIKE '%$title%'
)可能没有条件
最佳答案
评论( 相关
后面还有条评论,点击查看>>