if (pastart = -1) sql.append("select * from("); sql.append("select nid,sname,sdescription,nprice,sif (pastart = -1)sql.append("select * from(");sql.append("select nid,sname,sdescription,nprice,simg,(CASE smctag WHEN '0' THEN '有货'WHEN '1' THEN '
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/05 22:51:54
if (pastart = -1) sql.append("select * from("); sql.append("select nid,sname,sdescription,nprice,sif (pastart = -1)sql.append("select * from(");sql.append("select nid,sname,sdescription,nprice,simg,(CASE smctag WHEN '0' THEN '有货'WHEN '1' THEN '
if (pastart = -1) sql.append("select * from("); sql.append("select nid,sname,sdescription,nprice,s
if (pastart = -1)
sql.append("select * from(");
sql.append("select nid,sname,sdescription,nprice,simg,(CASE smctag WHEN '0' THEN '有货'WHEN '1' THEN '缺货' END) as smctag,convert(VARCHAR(20),dcdate,120) as dcdate,nmaxid,nminid,ROW_NUMBER()over(ORDER BY (SELECT 1)) as line from t_mc where 1=1");//ok
if (nid = -1)
sql.append(" and nid=" + nid);
if (skey = null && skey.equals(""))
sql.append(" and sname like '%" + skey + "%'");
if (prstart = -1)
sql.append(" and nprice>=" + prstart);
if (prend = -1)
sql.append(" and nprice=" + pastart);
这段代码哪里有错误呢
if (pastart = -1) sql.append("select * from("); sql.append("select nid,sname,sdescription,nprice,sif (pastart = -1)sql.append("select * from(");sql.append("select nid,sname,sdescription,nprice,simg,(CASE smctag WHEN '0' THEN '有货'WHEN '1' THEN '
你最后把 sql语句输出来 放进去查询看看 就知道那里错了