JSP页面调用Servlet实现数据库表格数据显示
这是Servlet代码protectedvoiddoPost(HttpServletRequestreq,HttpServletResponseresp)throwsSe...
这是Servlet代码
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String varRt_card_no=req.getParameter("varRt_card_no");
String varRt_point_bank=req.getParameter("varRt_point_bank");
String rangeg=req.getParameter("Range");
String sql="select CM_ITEM_CODE,CM_ITEM_DESC,CM_REDEMPTION_POINT from cp_crdtbl,CP_PNTBNK,cp_bnkcat,cp_catitm WHERE " +
"CP_PNTBNK.PB_BANK_ID=cp_bnkcat.BC_POINT_BANK_ID" +
"and cp_bnkcat.BC_CATITM_ID=cp_catitm.CM_CATALOGUE_CODE" +
"and cp_crdtbl.cb_cardholder_no= '"+varRt_card_no+"'";
try {
StatisticsDBObject sb=new StatisticsDBObject();
sb.getMultiStatistics(sql);
} catch (Exception e) {
e.printStackTrace();
} 展开
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String varRt_card_no=req.getParameter("varRt_card_no");
String varRt_point_bank=req.getParameter("varRt_point_bank");
String rangeg=req.getParameter("Range");
String sql="select CM_ITEM_CODE,CM_ITEM_DESC,CM_REDEMPTION_POINT from cp_crdtbl,CP_PNTBNK,cp_bnkcat,cp_catitm WHERE " +
"CP_PNTBNK.PB_BANK_ID=cp_bnkcat.BC_POINT_BANK_ID" +
"and cp_bnkcat.BC_CATITM_ID=cp_catitm.CM_CATALOGUE_CODE" +
"and cp_crdtbl.cb_cardholder_no= '"+varRt_card_no+"'";
try {
StatisticsDBObject sb=new StatisticsDBObject();
sb.getMultiStatistics(sql);
} catch (Exception e) {
e.printStackTrace();
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询