简欧白胚餐椅:这个函数怎么加进去

来源:百度文库 编辑:高校问答 时间:2024/04/28 01:51:54
原来我的是
sql="select * from GsXiangmu where Gs_ID="&Gs_ID&" order by Leexii_GsXiangmu_QTime"

是从数据库GsXiangmu 读取参数为Gs_ID的数据以时间循序列出来。

现在想增加一个参数就是GsXiangmu_Lei=1

就是从数据库GsXiangmu 读取参数为Gs_ID 和GsXiangmu_Lei=1的数据

怎么写入,我试了好久不行啊
求救

sql="select * from GsXiangmu where Gs_ID="&Gs_ID&" AND GsXiangmu_Lei=1 order by Leexii_GsXiangmu_QTime"

确保你的GxXiangmu表里有GxXianmu_Lei字段

sql="select * from GsXiangmu where (Gs_ID="&Gs_ID&" and GsXiangmu_Lei=1) order by Leexii_GsXiangmu_QTime"