微擎关键字触发条件查询方式

      发布在:后端技术      评论:0 条评论

image

//     重点实现的查询条件在这里
     $condition = <<<EOF
`uniacid` IN ( 0, {$_W['uniacid']} )
AND
(
  ( `type` = 1 AND `content` = :c1 )
  or
  ( `type` = 2 AND instr(:c2, `content`) )
  or
  ( `type` = 3 AND :c3 REGEXP `content` )
  or
  ( `type` = 4 )
)
AND `status`=1
EOF;


相关文章
热门推荐