城市概念创意园区:jsp里的查询问题

来源:百度文库 编辑:高校问答 时间:2024/04/25 00:32:44
现在想令这个页面只查询类别值为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