超市发北京门店分布图:select的一个解释

来源:百度文库 编辑:高校问答 时间:2024/04/29 10:32:15
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select id,name,score,price1,price2,vipprice,discount from product where id in ("&id&") order by id ",conn,1,1

set rs=server.CreateObject("adodb.recordset")
rs.open "select product.id,product.name,product.vipprice,product.price1,product.price2,product.score,orders.sex,orders.realname,orders.recepit,orders.goods,orders.postcode,orders.comments,orders.paymethord,orders.deliverymethord,orders.paid,orders.productnum from product inner join orders on product.id=orders.id where orders.username='"&request.Cookies("timesshop")("username")&"' and state=2 and goods='"&goods&"' ",conn,1,1

这两个有点麻烦,第一段中where id in ("&id&") order by id ",conn,1,1,那个("&id&")是怎么获得的呢,我找了好久找不到,上下文中没有关于他的值啊!请大家看一下怎么获得的.

能不能解释一下这两段该怎么理解呢,多谢了!

set rs2=server.CreateObject("adodb.recordset")
rs2.open "select id,name,score,price1,price2,vipprice,discount from product where id in ("&id&") order by id ",conn,1,1

这个从product表中批量提取 ID=("&id&") 的字段id name score price1 price2 vipprice discount

("&id&")这个ID应该是前一页POST过来的 前一页应该是选全或者单选产品

确实没有不知道从哪来的

确实没有不知道从哪来的