多条件搜索
<%
dim keyword,search_type
search_type= "Snjj_sms "
keyword=request( "sms_cllx ") ’条件1为汉字
keyword1=request( "sms_cbh ") ’条件2为汉字
set sear=server.CreateObject( "adodb.recordset ")
s_sql= "select * from "&search_type& " where sms_cllx= "&keyword& " and sms_cbh= "&keyword1& " order by id desc "
sear.open s_sql,conn,1,1
%>
这样写对吧?
错误提示:
Microsoft OLE DB Provider for SQL Server 错误 '80040e14 '
列名 '小型汽车品牌 ' 无效。 --> 这里指的是:sms_cllx
/ChaPage.asp,行 9
------解决方案-------------------- s_sql= "select * from "&search_type& " where sms_cllx= ' "&keyword& " ' and sms_cbh= ' "&keyword1& " ' order by id desc "