테스트 사이트 - 개발 중인 베타 버전입니다

phpmyadmin에서 특정문구 치환 채택완료

아몬2 4년 전 조회 2,510

update 테이블 wr_content=REPLACE(wr_content,'기존단어','바꿀단어')

 

이렇게 알고 있습니다.

<img src = <img src='https://taesarang.com

이 부분을 

<img src="https://thailove.net/taesarang

이렇게 바꾸기 위해

 

UPDATE g5_write_01_1 SET wr_content=REPLACE(wr_content,'<img src = <img src='https://taesarang.com','<src="https://thailove.net/taesarang') ;

이렇게 하고 실행했는데

바꿀 단어 안에 작은 따옴표가 있어서 그런가 아래와 같은 오류가 나오네요.

이럴 경우 어떻게 해야 할까요?

 

 


 

정적 분석 :

분석 중에 1개의 오류가 발생했습니다.

 

  1. 닫는 따옴표 " 가 팔요합니다. (near "" at position 140)

 

SQL 질의: https://taesarang.com','<src="https://thailove.net/taesarang');" href="https://thailove.net/adm/phpadmin/phpMyAdmin/index.php?route=/database/sql&db=walkasia#">복사

update g5_write_free set wr_content=REPLACE(wr_content,'<img src = <img src='https://taesarang.com','<src="https://thailove.net/taesarang');

MySQL 메시지: https://thailove.net/adm/phpadmin/phpMyAdmin/url.php?url=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.7%2Fen%2Fserver-error-reference.html" target="mysql_doc">문서https://thailove.net/adm/phpadmin/phpMyAdmin/themes/dot.gif" title="문서" />

#1064 - 'SQL 구문에 오류가 있습니다.' 에러 같읍니다. ('https://taesarang.com','<src="https://thailove.net/taesarang')' 명령어 라인 1)
 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
핑크빈
4년 전

UPDATE g5_write_01_1 SET wr_content=REPLACE(wr_content,'<img src = <img src=\'https://taesarang.com','<img src="https://thailove.net/taesarang') ;

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

아몬2
4년 전
덕분에 잘 처리 하였습니다 ^^
주말 휴일 잘 보내세요, 감사합니다~

댓글을 작성하려면 로그인이 필요합니다.

4년 전
MySQL recognizes the following escape sequences.
\0     An ASCII NUL (0x00) character.
\'     A single quote (“'”) character.
\"     A double quote (“"”) character.
\b     A backspace character.
\n     A newline (linefeed) character.
\r     A carriage return character.
\t     A tab character.
\Z     ASCII 26 (Control-Z). See note following the table.
\\     A backslash (“\”) character.
\%     A “%” character. See note following the table.
\_     A “_” character. See note following the table.
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

아몬2
4년 전
제가 꼬꼬마라서 어설픕니다 ㅠㅠ
감사합니다~ 주말 휴일 잘 보내세요~

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인