mysql_query("SELECT a.about,a.user,b.user,b.title,b.article,b.description
FROM about a
JOIN articles b ON b.user_id=a.user_id
WHERE MATCH(b.title,b.article) AGAINST ('$search')
");
我需要扩展此查询以包含something like " AND user='$user'"
,但检查两个'a' and 'b'
表。
我可以做"AND a.user='$user' AND b.user='$user'"
但是我会增加18个表,所以这看起来有点臃肿。
有没有办法让事情更紧凑?