FROM 子句语法错误 高手帮帮忙哦!
来源:百度知道 编辑:UC知道 时间:2024/06/20 17:57:06
<%sub down_body()
dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
keyword=request("keyword")
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")
sql="SELECT * FROM soft order by soft_joindate desc"
if cat_id<>"" and class_id="" then
sql="SELECT * FROM soft soft_catid="&cat_id&" order by soft_joindate desc"
elseif class_id<>"" and keyword="" then
sql="SELECT * FROM soft soft_classid="&class_id&" order by soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
sql="select * from soft "&colname&" like '%"&keyword&"%' order by soft_joindate desc"
elseif keyword<>"" and colname="0" then
sql="select * from soft s
dim keyword,class_id,colname,totalsoft,Currentpage,totalpages,i
keyword=request("keyword")
cat_id=request("cat_id")
class_id=request("class_id")
colname=request("colname")
sql="SELECT * FROM soft order by soft_joindate desc"
if cat_id<>"" and class_id="" then
sql="SELECT * FROM soft soft_catid="&cat_id&" order by soft_joindate desc"
elseif class_id<>"" and keyword="" then
sql="SELECT * FROM soft soft_classid="&class_id&" order by soft_joindate desc"
elseif keyword<>"" and colname<>"0" then
sql="select * from soft "&colname&" like '%"&keyword&"%' order by soft_joindate desc"
elseif keyword<>"" and colname="0" then
sql="select * from soft s
sql="SELECT * FROM soft soft_catid
sql="SELECT * FROM soft soft_classid
sql="select * from soft "&colname&"
sql="select * from soft soft_name
以上的sql="SELECT * FROM soft后面加上个where看看
这个你先把SQL语句打印出来再看嘛。
在
rssoft.open sql,conn,1,1
之前,加上。
Response.write sql
在
rssoft.open sql,conn,1,1
之前,加上。
Response.write sql
Response.end
rssoft.open sql,conn,1,1
就好分析错误了,