insert select구문을 update select 구문형태로 변경 도와주세요.

insert select구문을 update select 구문형태로 변경 도와주세요.

QA

insert select구문을 update select 구문형태로 변경 도와주세요.

답변 1

본문

안녕하세요. 무더위에  건강챙기세요..

한가지 문의드릴께 있어서 글 남깁니다.
 

$opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_type, it_id, io_price, io_stock_qty, io_noti_qty, io_use )
                select io_id, io_type, '$new_it_id', io_price, io_stock_qty, io_noti_qty, io_use
                    from {$g5['g5_shop_item_option_table']}
                    where it_id = '$it_id'
                    order by io_no asc ";
sql_query($opt_sql);

 

기존옵션을 업데이트 하는 형태로 바꾸려는데...

 

위와 같은 구문을  update select 구문으로 변경하려는데..  도움말씀부탁드립니다.

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 17,962
© SIRSOFT
현재 페이지 제일 처음으로