#12002/1/12 2:00:28
这是一个查询(属性)前25名用户的句子
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
if orders=1 then
sql="select top 25 username,useremail,userclass,oicq,homepage,article,userWealth,userEP,addDate, from [user] order by article desc"
elseif orders=2 then
sql="select top 25 username,useremail,userclass,oicq,homepage,article,userWealth,userEP,addDate, from [user] order by AddDate desc"
elseif orders=3 then
sql="select top 25 username,useremail,userclass,oicq,homepage,article,userWealth,userEP,addDate, from [user] order by userWealth desc"
elseif orders=4 then
sql="select top 25 username,useremail,userclass,oicq,homepage,article,userWealth,userEP,addDate, from [user] order by userEP desc"
else
sql="select top 25 username,useremail,userclass,oicq,homepage,article,userWealth,userEP,addDate, from [user] order by article desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
运行时出现
错误类型:
Microsoft JET Database Engine (0x80040E14)
SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。
/mabo/toplist.asp, 第 86 行
也就是
我觉得没错阿,怎么老是有错误?
是否和userWealth,userEP是数字类型有关,因为其他属性步是数字,没有加userWealth,userEP时是好的,加了就变坏了:(
如果是userWealth,userEP影响的,怎么解决呢?