디지털 컨버전스/Project
[Project] 이미지 업로드 & 출력
gimyeondong
2020. 5. 18. 14:24
웹에서 파일 업로드 구현하기 -1
웹에서 파일 업로드 구현-1 (jsp) 1. 환경설정 http://www.servlets.com/cos 에 접속한다. 위 그림 위치로 가서 .zip 파일을 다운받고 압축을 풀자. (혹시 몰라 파일첨부) lib폴더에 가면 cos.jar 파일이 있다...
kutar37.tistory.com
LawView profile 0518.zip
2.68MB
/*프로필 게시판*/
/*name,office_name,office_phone,id -변호사 회원가입 테이블 불러오기*/
/*나머지는 프로필 글쓰기로 insert*/
CREATE TABLE profile_board
(
seq NUMBER primary key,
name VARCHAR2(20) NOT NULL,
title VARCHAR2(100) NOT NULL,
phone VARCHAR2(20) NOT NULL,
specialty VARCHAR2(400) NOT NULL,
office_name VARCHAR2(50) NOT NULL,
office_phone VARCHAR2(20) NOT NULL,
test VARCHAR2(50) NOT NULL,
education VARCHAR2(400) NOT NULL,
id VARCHAR2(20) NOT NULL,
img VARCHAR2(100)
);
create sequence profile_board_seq
start with 1
increment by 1
nocache
nomaxvalue;
insert into profile_board values(
profile_board_seq.nextval,
'name'||profile_board_seq.currval,
'title',
'test',
'phone',
'specialty',
'office_name',
'office_phone',
'test',
'id'||profile_board_seq.currval,
null);
select * from profile_board;
commit;
insert into profile_board values(
profile_board_seq.nextval,
'이름',
'제목',
'테스트용 번호',
'sp',
'테스트용 사무소명',
'사무소번호',
'테스트용 출신시험',
'edu',
'아이디');
/*카테고리 테이블*/
/*일단 개발자가 만들어 놓고 관계테이블에서 join하는 용도*/
/*나중에 시간 남으면 관리자가 추가 제거?*/
CREATE TABLE category
(
category_code VARCHAR2(20) primary key,
category_name VARCHAR2(20) NOT NULL
);
insert into category values('c01','이혼');
insert into category values('c02','부동산');
insert into category values('c03','형사');
insert into category values('c04','세금');
select * from category;
CREATE TABLE lawyer_category
(
lawyer_id VARCHAR2(20) NOT NULL,
category_code VARCHAR2(20) NOT NULL
);
insert into lawyer_category values('id1','c01');
insert into lawyer_category values('id1','c02');
insert into lawyer_category values('id2','c01');
insert into lawyer_category values('id2','c04');
insert into lawyer_category values('id3','c04');
insert into lawyer_category values('id4','c01');
insert into lawyer_category values('id4','c02');
insert into lawyer_category values('id4','c03');
select * from lawyer_category;
/*아이디 - 카테고리 코드 - 카테고리 이름*/
select
*
from lawyer_category lc , category c
where
lc.category_code = c.category_code;
/*이름 - 카테고리 출력*/
select
pb.name, c.category_name
from profile_board pb, lawyer_category lc , category c
where
pb.id = lc.lawyer_id and
lc.category_code = c.category_code;
ROLLBACK ;
select
*
from
(select
profile_board.*, row_number() over(order by seq desc) rnum
from profile_board)
where rnum between 1 and 10;
insert into profile_board
values(profile_board_seq.nextval,'name','title','phone','specialty','oname','ophone','test','edu','id');
select * from profile_board where seq=2;
delete from profile_board where seq=48;
select * from profile_board;
commit;
update profile_board
set title='updateTEST', specialty='super', education='none'
where seq =29;
update profile_board set title='updateTEST', specialty='super', education='none' where seq =29;
insert into profile_board values(profile_board_seq.nextval,'1','2','3','4','5','6','7','8','9','0');
select * from profile_board;
commit;