BoardMapper.xml
페이지 정보
본문
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pkt.mapper.BoardMapper">
<select id="getList" resultType="com.pkt.model.BoardVO">
<!-- <![CDATA[ ]] 쓰는 이유 -->
<!-- sql 구문안에 비교 연산자가 들어갈 경우(특수문자) 문자열로 인식하게 하기 위해서 ... -->
<![CDATA[
select * from tbl_board where bno > 0
]]>
</select>
<select id="listPage" resultType="com.pkt.model.BoardVO">
<![CDATA[
select * from tbl_board where bno > 0 order by bno desc limit #{page}, 5
]]>
</select>
<insert id="create">
insert into tbl_board (title, content, writer) values (#{title},#{content}, #{writer})
</insert>
<select id="read" resultType="com.pkt.model.BoardVO">
select * from tbl_board where bno = #{bno}
</select>
<update id="update">
update tbl_board set title =#{title}, content =#{content} where bno = #{bno}
</update>
<delete id="delete">
delete from tbl_board where bno = #{bno}
</delete>
</mapper>
- 이전글BoardMapper.java 24.07.30
- 다음글▲ BoardMapperTests.java 24.07.30
댓글목록
등록된 댓글이 없습니다.