【文件属性】:
文件名称:网上购书系统SQL和ASP做的
文件大小:552B
文件格式:HTM
更新时间:2012-01-02 06:53:25
购书
用于课程设计和毕业设计
%@ LANGUAGE="VBScript" %>
我的网络书店
<%
If Request("ISBN") <> "" Then
' 注释:生成SQL查询语句
mysql = "SELECT a.ISBN, a.title AS btitle, a.author, a.ptime, a.porder, " & _
"a.format, a.psize, a.pages, a.words, a.cdrom, a.price, " & _
"a.content, b.title AS ptitle " & _
"FROM book AS a JOIN Publisher AS b " & _
"ON PATINDEX('%-' + b.id + '-%',a.ISBN) > 0 " & _
"WHERE a.ISBN = '" & Request("ISBN") & "'"
' 注释:连接数据库并执行SQL语句
Set objRS = Session("objRS")
objRS.Source = mysql
objRS.Open
' 注释:显示相关结果
If objRS.RecordCount > 0 Then
price = CSng(objRS("price"))
outstr = _
"
" & _
"" & _
"" & objRS("btitle") & _
" |
" & _
"
|
" & _
"" & _
"" & _
" | 图书封面 |
---|
" & _
" | " & _
"" & _
"作 者: | " & objRS("author") & " | " & _
"书 号: | " & objRS("ISBN") & " | " & _
"出版社: | " & objRS("ptitle") & " | " & _
"出版时间: | " & objRS("ptime") & " | " & _
"版 次: | 第 " & objRS("porder") & " 版 | " & _
"装 订: | " & GetFormat(objRS("format")) & " | " & _
"开 本: | " & GetPsize(objRS("psize")) & " | " & _
"页 数: | " & GetPages(objRS("pages")) & " | " & _
"字 数: | " & GetWords(objRS("words")) & " | " & _
|