freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于jsp方面的網(wǎng)上書店論文修改版-資料下載頁

2025-05-07 18:22本頁面
  

【正文】 ):String Getsqlflag():boolean Insert():boolean Op_book():void To_string():String Update():boolean request = newrequest。 String ID = (id)。 long bookid = 0。 try{ bookid = (ID)。 }catch (Exception e){ } (bookid)。 String bookname = (bookname)。 if (bookname==null || ()) { bookname = 。 sqlflag = false。 } (to_String(bookname))。 String author = (author)。 if (author==null || ()) { author = 。 sqlflag = false。 } (to_String(author))。 String publish = (publish)。 if (publish==null) { publish = 。 } (to_String(publish))。 String bookclass = (bookclass)。 int bc = (bookclass)。 (bc)。 String bookno = (bookno)。 if (bookno == null) { bookno = 。 } (to_String(bookno))。 String picture = (picture)。 if (picture == null) { picture = images/。 } (to_String(picture))。 float price。 try { price =new Float((price)).floatValue()。 } catch (Exception e){ price = 0。 sqlflag = false。 } (price)。 int amount。 try{ amount = new Integer((amount)).intValue()。 }catch (Exception e){ sqlflag = false。 amount = 0。 } (amount)。 String content = (content)。 if (content == null) { content = 。 } (to_String(content))。 if (sqlflag) { flag = true。 } return flag。 }catch (Exception e){ return flag。 } } 2) book_search()方法 該方法負(fù)責(zé)圖書查詢,包括圖書的分類,分頁、關(guān)鍵字查詢。首先通過getRequest()方法獲得頁面表單參數(shù)值,根據(jù)參數(shù)值判斷是何種查詢,然后根據(jù)相應(yīng)的 SQL 的語句從數(shù)據(jù)庫里查詢相應(yīng)的值。這里需要用到分頁技術(shù)。 部分代碼如下: /** * 完成圖書查詢,包括分類,分頁查詢 * @param res * @return * @throws */ public boolean book_search(HttpServletRequest res) throws Exception { DataBase db = new DataBase()。 ()。 Statement stmt = ()。 request = res。 String PAGE = (page)。 //頁碼 String classid = (classid)。 //分類 ID號 String keyword = (keyword)。 //查詢關(guān)鍵詞 if (classid==null) classid=。 if (keyword==null) keyword = 。 keyword = to_String(keyword).toUpperCase()。 try { page = (PAGE)。 }catch (NumberFormatException e){ page = 1。 } //取出記錄數(shù) if (!() amp。amp。 () ) { sqlStr = select count(*) from book where bookclass=39。+classid + 39。 } else if (!()) { if (()){ sqlStr = select count(*) from book where upper(bookname) like 39。% + keyword+ %39。 or upper(content) like 39。% + keyword + %39。 } else { sqlStr = select count(*) from book where bookclass=39。 + classid + 39。 and (upper(bookname) like 39。% +keyword+ %39。 or + upper(content) like 39。% + keyword + %39。)。 } } else { sqlStr = select count(*) from book。 } int rscount = pageSize。 try { ResultSet rs1 = (sqlStr)。 if (()) recordCount = (1)。 ()。 }catch (SQLException e){ (())。 return false。 } //設(shè)定有多少 pageCount if (recordCount 1) pageCount = 0。 else pageCount = (int)(recordCount 1) / pageSize + 1。 //檢查查看的頁面數(shù)是否在范圍內(nèi) if (page 1) page = 1。 else if (page pageCount) page = pageCount。 rscount = (int) recordCount % pageSize。 // 最后一頁記錄數(shù) //sql為倒序取值 sqlStr = select ,+ ,,+ , from book a,bookclass b+ where = 。 if (!() amp。amp。 () ){ //如果類別不為空 , 非查詢 if (page == 1) { sqlStr = sqlStr + and =39。 + classid + 39。 + order by desc。 } else { sqlStr = sqlStr + and =39。 + classid + limit + (recordCountpageSize * page)+,+(recordCountpageSize * (page1))。 } } else if (!()) { //如果是查詢資料 if (page == 1){ if (!()) {//查詢某一類 sqlStr = sqlStr + and =39。 + classid + 39。 and (upper() like 39。% + keyword+ %39。 or upper() like 39。% + keyword + %39。) order by desc。 } else { //查詢所有類 sqlStr = sqlStr + and (upper() like 39。% + keyword+ %39。 or upper() like 39。% + keyword + %39。) order by desc。 } } else { if (!()){ sqlStr = sqlStr + and =39。 + classid + 39。 and (upper() like 39。% + keyword+ %39。 or upper() like 39。% + keyword + %39。) limit +(recordCountpageSize * page)+,+ (recordCountpageSize * (page1))。 } else { sqlStr = sqlStr + and (upper() like 39。% + keyword+ %39。 or upper() like 39。% + keyword + %39。) limit +(recordCountpageSize * page)+,+ (recordCountpageSize * (page1))。 } } } else {//非查詢 , 也非分類瀏覽 if (page == 1){ sqlStr = sqlStr + order by desc limit 0,+pageSize。 } else { sqlStr = sqlStr + limit +(recordCountpageSize * page)+,+ (recordCountpageSize * (page1
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1