멍청멍청기록/프로젝트 일지 프로젝트] Mybatis 검색 조건 설정하기. - 728x90 반응형 셀렉트 박스 하나, input 박스 하나, 그리고 조회 버튼 하나. 이렇게 총 3개가 있었을 때 1. 셀렉트 박스[rsno, name, tel] 상품이나 뭔가를 선택. 2. input 박스에는 검색어를 조건으로 선택. <if test='searchData != null and searchData != ""'> <if test='searchType != null'> <if test='searchType == "RSNO"'> AND tr.rs_seq = #{searchData} </if> <if test='searchType == "NAME"'> AND tr.rs_buyer_name LIKE CONCAT('%', #{searchData}, '%') </if> <if test='searchType == "TEL"'> AND tr.rs_buyer_tel LIKE CONCAT('%', #{searchData}, '%') </if> </if></if> searchData 는 input BOX searchType 은 조건 위의 if test 조건은 input 박스에 아무것도 쓰지 않고 select를 아무것도 하지 않으면 전체 조회가 된다. 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기준수한쭈니네 저작자표시 (새창열림) Contents 당신이 좋아할만한 콘텐츠 프로젝트] Mybatis Sql 2020.06.18 프로젝트] 로직을 좀 더 단순하게 변경. 2020.06.16 프로젝트] Mybatis 문에 insert 할 때 .. 2020.05.22 프로젝트] 에러 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'kr.co.smartix.mapper.OfflineMapper.selectWinBoxOffi.. 2020.05.21 댓글 0 + 이전 댓글 더보기