BoardMapper.xml > SPRING1

본문 바로가기

사이트 내 전체검색

뒤로가기 SPRING1

BoardMapper.xml

페이지 정보

작성자 관리자 작성일 24-07-30 09:46 조회 695 댓글 0

본문

<?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>


<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>

댓글목록 0

등록된 댓글이 없습니다.


Copyright © dancePKT. All rights reserved.
PC 버전으로 보기