回 帖 发 新 帖 刷新版面

主题:ASP查询数据库问题

sql="select * from 表 where id="&id 

如果我查的不是id 比如说查的是时间 也是
sql="select * from 表 where time="&time   吗?

请各位高手指点 如果不是 应该怎么写?

回复列表 (共1个回复)

沙发

字符型字段
sql="select * from table where filed='"&f&"'"
时间型字段
sql="select * from table where filed=#"&f&"#" (access数据库中)
sql="select * from table where filed='"&f&"'" (sql数据库中)
数字型字段
sql="select * from table where filed="&f

我来回复

您尚未登录,请登录后再回复。点此登录或注册