db에 html저장하기 정보
db에 html저장하기본문
$sql = "select wr_content from g4_write_test where wr_id=$wrid";
$result = sql_query($sql);
$row=mysql_fetch_array($result);
$a=$row[wr_content];
$b="<img src='ad.jpg' />";
$d = str_replace($text,$b,$a);
$sql = "update g4_write_test set wr_content=$d, wr_9='$wr9' where wr_id='$wrid'";
sql_query($sql);
g4_write_test 게시판에 특정 조건에 맞는 글의 content값(html)을 가저와서 변경한후에 다시 업데이트하는 건데요 위 구문을 실행시키면
update g4_write_test set wr_content=
html이 출력되고(html소스말고 진짜 div나 table img가 뜸)
, wr_9='7' where wr_id='19'
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=
이런오류가뜨네요 어떻게 해야할까요 참고로 이파일은 view.skin.php에서 submit한 php페이지입니다
$result = sql_query($sql);
$row=mysql_fetch_array($result);
$a=$row[wr_content];
$b="<img src='ad.jpg' />";
$d = str_replace($text,$b,$a);
$sql = "update g4_write_test set wr_content=$d, wr_9='$wr9' where wr_id='$wrid'";
sql_query($sql);
g4_write_test 게시판에 특정 조건에 맞는 글의 content값(html)을 가저와서 변경한후에 다시 업데이트하는 건데요 위 구문을 실행시키면
update g4_write_test set wr_content=
html이 출력되고(html소스말고 진짜 div나 table img가 뜸)
, wr_9='7' where wr_id='19'
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=
이런오류가뜨네요 어떻게 해야할까요 참고로 이파일은 view.skin.php에서 submit한 php페이지입니다
작성자에 의해 채택됐습니다.
$sql = "update g4_write_test set wr_content='$d', wr_9='$wr9' where wr_id='$wrid'";
wr_content=$d 를 wr_content='$d' 로 바꿔주세요
wr_content=$d 를 wr_content='$d' 로 바꿔주세요
댓글 전체
작성자에 의해 채택됐습니다.
$sql = "update g4_write_test set wr_content='$d', wr_9='$wr9' where wr_id='$wrid'";
wr_content=$d 를 wr_content='$d' 로 바꿔주세요
wr_content=$d 를 wr_content='$d' 로 바꿔주세요