|
主题: 这一句错在哪里?
|
 dayusky
职务:普通成员
等级:1
金币:0.0
发贴:77
注册:2002/7/5 23:42:07
|
#12003/1/27 17:28:10
不明白,调不出数据?? sqltext="select * from comment_article where article_id='"&trim(Request.QueryString ("id"))&"' order by id desc" 那个Request.QueryString ("id")到底要怎么搞?
|
 大雪糕
职务:普通成员
等级:2
金币:10.0
发贴:579
注册:2002/2/2 11:30:51
|
#22003/1/27 17:44:13
读取上一页面传递过来的ID值,你如果没把ID传递过来,当然调不出去数据
|
 dayusky
职务:普通成员
等级:1
金币:0.0
发贴:77
注册:2002/7/5 23:42:07
|
#32003/1/27 22:34:06
当然上一页有id传过来,我只是sql语句不熟,其实如果不排序,可以这样写: sqltext="select * from comment_article where article_id="&Request.QueryString ("id") 如果加上order by id desc,应该怎么写?
|
 缺缺
职务:管理员
等级:8
金币:41.0
发贴:9620
注册:2004/1/14 19:14:47
|
#42003/1/27 23:53:07
sqltext="select * from comment_article where article_id='"&Request.QueryString ("id")&"'order by id desc"
|
 沉默是金
职务:普通成员
等级:6
金币:11.2
发贴:4357
注册:2004/2/18 11:17:25
|
#52003/2/5 20:04:27
ID是数值函数,不需要单引号的 id=trim(request.querystring("id")) sql="select * from comment_article where article_id="&id&" order by ......" 好象是这样,我也不太记得了。
难人一个……
|