是你的sql语句有问题:少一对单引号
sql="select * from zfdjb where fx='%"&fx&"%' and qy='"&qy&"' and zj<='"&zj&"' order by id desc"

解决方案 »

  1.   

    是你的sql语句有问题:少一对单引号
    sql="select * from zfdjb where fx='%"&fx&"%' and qy='"&qy&"' and zj<='"&zj&"' order by id desc"确实
      

  2.   

    表结构如下:
    fx:文本型
    qy:文本型
    zj:数字型
      

  3.   

    表结构如下:
    fx:文本型
    qy:文本型
    zj:数字型那你的order by id desc哪里来的?
    还有错误提示是什么
      

  4.   

    id 是另外一个自动编号的字段
    没有任何错误提示,但是查询结果不正确贴上前面那段:
    <%
    if request("fx")<>"" then
       fx=request("fx")
    else
       fx=""
    end ifif request("qy")<>"" then
       qy=request("qy")
    else
       qy=""
    end ifif request("zj")<>"" then
       zj=request("zj")
    else
       zj=100000000
    end if
    %>