⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getstocks.asp

📁 静宁成纪中学2006版 欢迎使用!
💻 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 + -