웹 기초 27강 - Ajax (Servlet)

Whatever·2021년 12월 3일
0

웹 기초

목록 보기
27/32

member.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE sqlMap
	PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
	"http://ibatis.apache.org/dtd/sql-map-2.dtd">
	
<sqlMap namespace="join">

	<!-- id 중복검사 -->
	<select id="checkId" resultClass="string" parameterClass="string">
		select mem_id from member where mem_id=#data#
	</select>
	
	<!-- 우편번호 검색 -->
	<select id="selectByDong" resultClass="zipVO" parameterClass="string">
		select * from ziptb where dong like #data#||'%'
	</select>
	
	<!-- 가입하기 -->
	<insert id="insertMember" parameterClass="memVO">
		 insert into member(
		 			mem_id, 
		 			mem_pass, 
		 			mem_name,
					mem_bir, 
					mem_zip, 
					mem_add1, 
					mem_add2,
					mem_hp, 
					mem_mail
				) values(
					#mem_id#, 
		 			#mem_pass#, 
		 			#mem_name#,
					#mem_bir#, 
					#mem_zip#, 
					#mem_add1#, 
					#mem_add2#,
					#mem_hp#, 
					#mem_mail#
				)
			<selectKey resultClass="string" keyProperty="mem_id">
				select mem_id from member where mem_id = #mem_id#
			</selectKey>	
				
	</insert>


</sqlMap>	

0개의 댓글