哪个网站卖二手书:jsp里的查询问题

来源:百度文库 编辑:中科新闻网 时间:2024/03/29 03:48:48
现在想令这个页面只查询类别值为4的。cateid='4'
我不知道where cateid='4' 该加在那里,SQL语句怎么写。请各位大侠帮帮忙。
代码在这里:
http://www.cirmm.com/WebSearch2.txt
这里只用到数据库里一个表。表名:gsecnewsinfo
涉及字段:
newsid ID号
cateid 类别
newstitle 标题
createtime 录入时间
newscontents 内容文件索引号,与newsid相对应

Select * From gsecnewsinfo where cateid=4