asp 保存数量
<%url=request.servervariables("http_referer")ProdIds=Session("ProdIds")ProdNums=Sessi...
<%
url=request.servervariables("http_referer")
ProdIds = Session("ProdIds")
ProdNums = Session("ProdNums")
Sub PutToShopBag( mc, ProdIds, )
If Len(ProdIds) = 0 Then
ProdIds =mc
ElseIf InStr( ProdIds, mc ) <= 0 Then
ProdIds = ProdIds & ","& mc
End If
End Sub
//保存商品数量
If Request("cmdShow") = "Yes" Then
ProdIds = ""
a = Split(nosql(request("mc")), ",")
For I=0 To UBound(a)
if a(I)="" then a(I)=1
PutToShopBag a(I), ProdIds
Next
Session("ProdIds") = ProdIds
ProdNums = ""
b = Split(nosql(request("pbuynums")), ",")
For I=0 To UBound(b)
if b(I)="" then b(I)=1
PutToShopBag b(I), ProdNums
Next
Session("ProdNums") = ProdNums
%>
<%
if ProdIds<>"" then
aaa=split(ProdNums,",")
bbb=split(ProdIds,",")
Quatitys=split(Request("pbuynums"),",")
session("y")=ubound(bbb)+1
zlcount=0
for i=0 to ubound(bbb)
set rs=server.createobject("adodb.recordset")
sql="select id,product_info_PriceM,product_info_PriceS,product_info_name,zhongliang,product_info_PicS from product_info where id="&bbb(i)
rs.open sql,conn,1,1
if rs.eof or rs.bof then
%>
想加一个字段上去,ProdPicS
但是添加到数据库 ProdPicS字段只保存两条数据,多了就不显示
问题可能就出在上面两段代码,高手帮忙看一下。分不多 多谢赐教!
ProdPicS字段放的是图片名称,类似20101241042593184.gif
字段大小设置为50
我改大一点看看 展开
url=request.servervariables("http_referer")
ProdIds = Session("ProdIds")
ProdNums = Session("ProdNums")
Sub PutToShopBag( mc, ProdIds, )
If Len(ProdIds) = 0 Then
ProdIds =mc
ElseIf InStr( ProdIds, mc ) <= 0 Then
ProdIds = ProdIds & ","& mc
End If
End Sub
//保存商品数量
If Request("cmdShow") = "Yes" Then
ProdIds = ""
a = Split(nosql(request("mc")), ",")
For I=0 To UBound(a)
if a(I)="" then a(I)=1
PutToShopBag a(I), ProdIds
Next
Session("ProdIds") = ProdIds
ProdNums = ""
b = Split(nosql(request("pbuynums")), ",")
For I=0 To UBound(b)
if b(I)="" then b(I)=1
PutToShopBag b(I), ProdNums
Next
Session("ProdNums") = ProdNums
%>
<%
if ProdIds<>"" then
aaa=split(ProdNums,",")
bbb=split(ProdIds,",")
Quatitys=split(Request("pbuynums"),",")
session("y")=ubound(bbb)+1
zlcount=0
for i=0 to ubound(bbb)
set rs=server.createobject("adodb.recordset")
sql="select id,product_info_PriceM,product_info_PriceS,product_info_name,zhongliang,product_info_PicS from product_info where id="&bbb(i)
rs.open sql,conn,1,1
if rs.eof or rs.bof then
%>
想加一个字段上去,ProdPicS
但是添加到数据库 ProdPicS字段只保存两条数据,多了就不显示
问题可能就出在上面两段代码,高手帮忙看一下。分不多 多谢赐教!
ProdPicS字段放的是图片名称,类似20101241042593184.gif
字段大小设置为50
我改大一点看看 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询