90普通女孩生活照:rs.open "select * from wq_user where username='"&request.Cookies("cnhww")("username")&"' ",conn,1,1
来源:百度文库 编辑:高考问答 时间:2024/05/03 06:36:36
rs.open "select * from wq_user where username='"&request.Cookies("cnhww")("username")&"' ",conn,1,1
这些'" "' ",有什么用?
这些'" "' ",有什么用?
在SQL里正常的查询语句应该是这个样式的:
select * from wq_user where username = '小红'
在VB中,由于 小红 这个位置是通过变量得来的,所以小红便被一个变量代替。于是就成了
select * from wq_user where username = '变量'
这样便出现了一个问题,这个变量被两个单引号包围,VB会将单引号以及里边的变量一起识别为一个字符串。所以我们要将这个语句拆开了写,我们可以用&连接符将变量与字符串常量连接。于是就成为这个样子:
"select * from wq_user where username = '" & 变量 & "'"
''是SQL语句中必需的;""是表明字符串
rs.open "select * from num",conn,2,3中的“2,3”是什么意思呢?
rs.open "select * from itemstoreb where itemid="&id,conn,1,3
rs.open"select * from lyb order by sj DESC",conn,1,1是什么
rs.open "select * from * where *",conn,1 请问其中的1,2,3表示什么?
rs.open "select TOP 3 * from detail where ..是选上面的,选最后的3个怎么修改
rs.open "select * from wq_user where username='"&request.Cookies("cnhww")("username")&"' ",conn,1,1
把rs.open "select * from num",conn,2,3中的“2,3”换为“1,1”是什么意思?能不能说的详细一些?
rs.open书写
vb与rs.open
rs_s.open "select * from wq_books where bookid="&bookid,conn,1,1