请高手看看asp站内搜索的代码那里出问题

来源:百度知道 编辑:UC知道 时间:2024/06/22 12:26:41
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/css.css" rel="stylesheet" type="text/css">
<title></title>
<style type="text/css">
<!--
@import url("../style/admin.css");
-->
</style>
</head>

<body>
<br>
<br>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_1">
<tr>
<td height="25" class="table_1_top">查找文章</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding=&quo

我也是用阿g的
sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article order by id desc"
后面加上一句试试看
else
sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article where class_id="&class_id&" order by id desc"
end if

sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article where fname='"&request("fname")&"'"
换成
sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article where fname=like'"&request("fname")&"'"

sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article where fname='"&request("fname")&"'"
换成
sql="select id,class_id,class_name,class_big,fname,oktime,title,up,hits from article where fname like '%"&request("fname")&"%&#