以下查询给了我 ERROR 1248 (42000): 每个派生表必须有自己的别名
SELECT *
FROM post
LEFT JOIN post_plus
ON ( post.id = post_plus.news_id )
LEFT JOIN (SELECT DISTINCT c1.postid FROM post_category c1 JOIN post_category c2 ON c1.postid = c2.postid WHERE c1.categoryid IN ( 130, 3, 4, 5 ) AND c2.categoryid = 73 )
where approve = 1
ORDER BY fixed DESC,
date DESC
LIMIT 0, 7;
我试过的
SELECT a.*
(FROM post
...
LIMIT 0, 7)a;