Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

guestbook.xml 본문

JSP/GuestBook

guestbook.xml

GAWON 2023. 6. 2. 17:53
<?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="org.joonzis.mybatis.guestbook"> 

	<!-- 1.전체 검색 -->
	<select id="select_all" resultType="org.joonzis.ex.GuestbookVO">
		SELECT * FROM GUESTBOOK ORDER BY IDX DESC
	</select>
	<!-- 2.회원 추가 -->
	<insert id="insert" parameterType="org.joonzis.ex.GuestbookVO">
		insert into GUESTBOOK values(guestbook_seq.nextval, #{writer}, #{email}, #{pw}, #{filename}, #{title},#{content} ,sysdate)
	</insert>
	<!-- 한개의 데이터 검색-->
	<select id="select_One" parameterType="int" resultType="org.joonzis.ex.GuestbookVO">
		 select * from GUESTBOOK where idx=#{idx}
	</select>
	<!-- 방명록 삭제 -->
	<delete id="delete" parameterType="int">
		DELETE FROM GUESTBOOK WHERE idx=#{idx}  	 	
	</delete>
	<!-- 방명록 수정 -->
	<update id="update" parameterType="org.joonzis.ex.GuestbookVO">
		update GUESTBOOK set email=#{email}, title=#{title}, content=#{content} where idx=#{idx}
	</update>
	
	
</mapper>

'JSP > GuestBook' 카테고리의 다른 글

download  (0) 2023.06.02
GuestbookVO  (0) 2023.06.02
GuestbookDao  (0) 2023.06.02
sqlmap.xml  (0) 2023.06.02
DBService  (0) 2023.06.02