SELECT boardId as boardId, boardNo as boardNo, categoryCd as categoryCd, parentBoardNo as parentBoardNo, regDate as regDate, bSubject as bsubject, bContent as bcontent, bWriter as bwriter, attachFile as attachFile, attachFileId as attachFileId, bNotice as bnotice, readCount as readCount, remark as remark FROM (SELECT A.*, ROWNUM AS RNUM FROM (SELECT * FROM TB_WWW_BOARD ORDER BY BNOTICE DESC, BOARDNO DESC, REGDATE DESC ) A ) WHERE RNUM > #{pageStart} AND RNUM <= (#{perPageNum}+#{pageStart}) AND BSUBJECT LIKE '%'||#{searchText}||'%' AND BCONTENT LIKE '%'||#{searchText}||'%'
SELECT NVL(COUNT(*), 0) as boardCount FROM TB_WWW_BOARD
SELECT boardId as boardId, boardNo as boardNo, categoryCd as categoryCd, parentBoardNo as parentBoardNo, regDate as regDate, bSubject as bsubject, bContent as bcontent, bWriter as bwriter, attachFile as attachFile, attachFileId as attachFileId, bNotice as bnotice, readCount as readCount, remark as remark FROM TB_WWW_BOARD WHERE BOARDNO = #{boardNo}
UPDATE TB_WWW_BOARD SET READCOUNT = READCOUNT+1 WHERE BOARDNO = #{boardNo}