select a.* from gbook a where a.re_id in (select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 ) order by a.postdate desc limit 10
select a.* from gbook a where a.re_id in (select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 ) order by a.postdate desc limit 10You have an error in your SQL syntax near 'select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 )' at line 1楼上的兄弟,仍然出现错误哦~
select a.* from gbook a where a.re_id in (select b.re_id from gbook b where b.re_id>0 order by b.postdate) order by a.postdate desc limit 10You have an error in your SQL syntax near 'select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 )' at line 1select a.* from gbook a where a.re_id in (select b.re_id from gbook b where b.re_id>0 order by b.postdate) order by a.postdate desc limit 0,10You have an error in your SQL syntax near 'select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 )' at line 1都不行哦~ :(
select a.* from gbook a where a.re_id in (select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 ) order by a.postdate desc limit 10You have an error in your SQL syntax near 'select b.re_id from gbook b where b.re_id>0 order by b.postdate desc limit 10 )' at line 1楼上的兄弟,仍然出现错误哦~
在4。1上没问题(当然是说后面的两句)
4。1里子从句仍然不可以带limit
mysql?版本?它不是所有版本都支持子查询的哦。
http://community.csdn.net/Expert/topic/4338/4338855.xml?temp=.8305628