You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
816 B

6 months ago
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.util.*"%>
<%
request.setCharacterEncoding("gb2312");//<2F><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
DBO db=new DBO();//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>
String sql="select a.*,b.spmc from jfdh a,shangpin b where 1=1 and a.sp=b.spid ";//<2F><>ѯ <20><><EFBFBD>ֶһ<D6B6>sql<71><6C><EFBFBD>
db.open();//<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
String sp=(String)request.getParameter("sp");//<2F><>Ʒ
if(sp!=null&&!sp.equals("")){
sql+=" and b.spmc like '%"+sp+"%'";//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ƴ<><C6B4>sql <20><>Ʒ
}
String hy=(String)request.getParameter("hy");//<2F><>Ա
if(session.getAttribute("yhm")!=null){
sql+=" and a.hy like '"+session.getAttribute("yhm")+"'";//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ƴ<><C6B4>sql <20><>Ա