asp中使用sql语句中排序的疑惑
飞起来一脚 2004-02-12 09:49:07 select id,name,title,date,nreply,nclick from forum where id in (select father from forum where father<>0 and name='"&name&"' order by id desc)
语句没有出错,但并没有按照我的意愿输出,我想按照条件(小括号部分)的id desc排序列出符合条件的结果.
具体说明:
一个简单论坛,发表和回复放在同一个表forum中,father=0表示新贴子,father<>0表示回复,且father表示所回复的贴子的id,我根据某个用户name回复的贴子查询出对应的主帖,并根据回复的date或者id将主贴排序输出,请问应该怎么写
(在括号内用order by不起作用,括号外的order则按照主贴的顺序排列,头疼)