时间:2021-07-01 10:21:17 帮助过:5人阅读
SELECT a.`askid`,a.`catid`,a.`title`,a.`status`,a.`addtime`,a.`reward`,a.`answercount`,b.`message`
FROM `phpcms_ask` a LEFT JOIN `phpcms_ask_posts` b ON a.`askid`=b.`askid`
WHERE (a.status=3 OR a.status=5) AND b.`isask`=1 AND (LOCATE('中国',a.`title`)>0 OR LOCATE('北京',a.`title`)>0 OR LOCATE('天安门',a.`title`)>0)