📄 getstocks.asp
字号:
<%@language=vbscript codepage=936 %>
<%
Option Explicit
%>
<!--#include file="../conn.asp"-->
<%
Dim ProductID
Dim rs,iStocks
ProductID = Trim(request("ProductID"))
If IsNumeric(ProductID) then
ProductID=Clng(ProductID)
else
ProductID=0
end if
If ProductID > 0 Then
Set rs = Conn.Execute("select Stocks,OrderNum from PE_Product where ProductID=" & ProductID & "")
If rs.BOF And rs.EOF Then
iStocks=0
else
iStocks=rs(0)-rs(1)
if iStocks<0 then iStocks=0
End If
rs.close
set rs=nothing
else
iStocks=0
End If
Response.Write "document.write('" & iStocks & "');"
Call CloseConn
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -