중복체크 정보
기타 중복체크본문
sql="SELECT * FROM 테이블 WHERE ddd='" & 비교할단어 & "'"
set rs=db.execute(sql)
IF Not Rs.EOF Then
ddd는 중복입니다
Else
ddd는 중복이 아닙니다.
End if
---------------------------
즉 한 예로, tbl_data 라는 테이블의 fld_a 라는 필드의 값중에서 "ddd"라는 값이 있는지를
검색한다면,
input_data=request("input_data")
DB 연결구문
set rs = db.execute("select count(fld_a) as fld_count from tbl_data where fld_a='" & input_data & "'")
max_count = rs("fld_count")
set rs = nothing
DB Close 구문
if max_count=0 then
테이블에 값이 없을 경우 처리 구문
elseif max_count>0 then
테이블에 값이 있을 경우 처리 구문
end if
set rs=db.execute(sql)
IF Not Rs.EOF Then
ddd는 중복입니다
Else
ddd는 중복이 아닙니다.
End if
---------------------------
즉 한 예로, tbl_data 라는 테이블의 fld_a 라는 필드의 값중에서 "ddd"라는 값이 있는지를
검색한다면,
input_data=request("input_data")
DB 연결구문
set rs = db.execute("select count(fld_a) as fld_count from tbl_data where fld_a='" & input_data & "'")
max_count = rs("fld_count")
set rs = nothing
DB Close 구문
if max_count=0 then
테이블에 값이 없을 경우 처리 구문
elseif max_count>0 then
테이블에 값이 있을 경우 처리 구문
end if
[이 게시물은 관리자님에 의해 2011-10-31 16:46:12 기타에서 이동 됨]
추천
0
0
댓글 0개