这样会无法搜索:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0409)
未结束的字符串常量
/vod/so/go.asp, line 65, column 125
Sql="Select * From MovieList where (title like '%"&trim(keyword)&"%') or (content like '%"&trim(keyword)&"%')Order BY ID Desc
我在后面加上 " 进行语句结束后:
错误类型:
Microsoft JET Database Engine (0x80040E14)
内存溢出
/vod/so/go.asp, 第 69 行
看来我只有把整个贴出来了,如下:
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style><!--#include File="Conn.asp" -->
<!--#include file="1.asp" -->
<%
If Session("AdminName")="0" and Session("Purview")="0" Then
Response.Redirect "Error.asp?id=005"
Else
Response.Write "<Html>"
Response.Write "<Head>"
Response.Write "<Title>移动影院 - 影视搜索 </title>"
Response.Write "<Meta Http-Equiv=""Content-Type"" Content=""Text/Html; CharSet=Gb2312"">"
Response.Write "</Head>"
Response.Write "<body topmargin=""2"">"
Response.Write "<div align=""center"">"
Response.Write "<center>"
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0"" bgcolor=""#CCCCCC"" style=""border-collapse: collapse"" bordercolor=""#111111"">"
Response.Write "<tr align=""center"" bgcolor=""#EEEEEE"">"
Response.Write "<td height=""25"" colspan=""3"" width=""100%""><p align=""center""><font color=""#FFFFFF""> "
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td height=""24"" bgcolor=""#EEEEEE"" width=""583""><p align=""center""> "
ClassID=Request("ClassID")
keyword=Request("keyword")
Set RsClass= Server.CreateObject("ADODB.Recordset")
RsClass.open "Select * From Class",Conn,1
If RsClass.Eof Then
Response.Write "暂时没有栏目"
Else
do while not RsClass.Eof
RsClass.Movenext
Loop
End If
RsClass.Close
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "<tr align=""center"" valign=""top"" bgcolor=""#FFFFFF"">"
Response.Write "<td height=""293"" colspan=""3"" width=""100%"">"
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">"
Response.Write "<form action=""go.asp"" method=""post"">"
Response.Write "<br><tr>"
Response.Write "<td width=""100%"" align=""center"">"
Response.Write "<input type=""text"" name=""keyword"" size=""50"" style=""font-size: 12px; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1"">"
Response.Write " <input type=""submit"" value=""移动搜索"">"
Response.Write "</form>"
Response.Write "<table width=""100%"" border=""1"" cellpadding=""0"" cellspacing=""0"" bordercolor=""#CCCCCC"" style=""border-collapse: collapse"">"
Dim Page
Page=Request("Page")
PageSize = 15
Dim Rs,Sql
If ClassID="" Then
Sql="Select * From MovieList where (title like '%"&trim(keyword)&"%') or (content like '%"&trim(keyword)&"%') Order BY ID Desc"
Else
End if
Set Rs=Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,3,3
Rs.PageSize = PageSize
Totalfilm=Rs.RecordCount
Pgnum=Rs.Pagecount
If Page="" or Clng(Page)<1 Then Page=1
If Clng(Page) > Pgnum Then Page=Pgnum
If Pgnum>0 Then Rs.AbsolutePage=Page
If Rs.Eof Then
Response.Write " </a><a href=""http://www.139com.cn""><Font Color=#FF0000> 提示 : 无搜索结果,请点击这里提交想要查询的影视关健字!搜索引擎会在你提交后自动查找收录! >>>点击返回移动主页!</a>"
Else
Response.Write "<tr>"
Response.Write "<td width=""100"" height=""25"" align=""center"" bgcolor=""dddddd"">图片预览</td>"
Response.Write "<td width=""150"" height=""25"" align=""center"" bgcolor=""dddddd"">电影名称</td>"
Response.Write "<td width=""230"" height=""25"" align=""center"" bgcolor=""dddddd"">简介</td>"
Response.Write "<td width=""80"" height=""25"" align=""center"" bgcolor=""dddddd"">类别</td>"
Response.Write "<td width=""50"" height=""25"" align=""center"" bgcolor=""dddddd"">点播次数</td>"
Response.Write "<td width=""160"" height=""25"" align=""center"" bgcolor=""eeeeee"">主演</td>"
Response.Write "</tr>"
Count=0
Do While Not (Rs.Eof Or Rs.Bof) And Count<Rs.PageSize
Response.Write "<tr>"
Response.Write "<td width=90 height=60 align=center >"
Response.Write("<a target=_blank href=""../Html/"&Rs("ID")&".html"" target=""_blank"">")
Response.Write("<img width=90 height=60 src="&rs("pic")&">")
Response.Write("</a><br>")
Response.Write "<td width='145' height='55'> <a href='../Html/"&Rs("ID")&".html' target='_blank'>"&Replace(rs("title"),trim(keyword),"<font color='red'>"&trim(keyword)&"</font>")&" </a></td>"
Response.Write "<td width=300 height=55 align=center >"
if len(rs("content"))>60 Then
response.write (mid(rs("content"),1,60))
response.write (".....")
else
response.write (rs("content"))
end if
response.write "</a></td>"
Response.Write "<td width=""80"" height=""25"" align=""center"">"&Rs("CLASSID")&" </a></td>"
Response.Write "<td width=""50"" height=""25"" align=""center""><Font Color=#FF0000>"&Rs("hits")&" </a></td>"
Response.Write "<td width=""160"" height=""70"" align=""name""strlen=""40"">"&Rs("name")&"</a></td>"
Response.Write "</tr>"
Rs.Movenext
Count=Count+1
Loop
End If
Response.Write "</table>"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "<tr bgcolor=""#EEEEEE"">"
Response.Write "<td height=""25"" colspan=""3"" align=""center"" width=""100%"">"
Response.Write "<Form Method=""Post"" action=""go.asp"">"
Response.Write "[第<Font Color=#FF0000>"& Page &"</font>页/共"& Rs.PageCount &"页] "
If Page=1 Then
Response.Write "[首 页] [上一页] "
Else
Response.Write "[<a href=""go.asp?Page=1&ClassID="& ClassID &""">首 页</a>] "
Response.Write "[<a href=""go.asp?Page="& Page-1 &"&ClassID="& ClassID &""">上一页</a>] "
End If
If Rs.PageCount-Page<1 Then
Response.Write "[下一页] [尾 页]"
Else
Response.Write "[<a href=""go.asp?Page="& Page+1 &"&ClassID="& ClassID &""">下一页</a>] "
Response.Write "[<a href=""go.asp?Page="& Rs.PageCount &"&ClassID="& ClassID &""">尾 页</a>]"
End If
Response.Write " 共[<Font Color=#FF0000>"& Totalfilm &"</font>]部电影"
Response.Write " 转到:<Input Type='Text' Name=""Page"" Size=2 Maxlength=10 value="""& Page &""" align=""center"">"
Response.Write "<Input Type=""Submit"" value=""Goto"" Size=2 Name=""Submit"">"
Response.Write "<Input Type=""Hidden"" value="""& ClassID &""" Name=""Hidden"">"
Rs.Close
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td height=""25"" align=""center"" bgcolor=""#EEEEEE"" colspan=""3""><font color=""#FFFFFF"">©"
Response.Write "</tr>"
Response.Write "</table>"
Response.Write "</center>"
Response.Write "</div>"
Response.Write "</body>"
Response.Write "</html>"
End If %>