제

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페이지입니다

댓글 1개

$sql = "update g4_write_test set wr_content='$d', wr_9='$wr9' where wr_id='$wrid'";

wr_content=$d 를 wr_content='$d' 로 바꿔주세요
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-08-07 조회 1,681
13-08-07 조회 1,001
13-08-07 조회 3,397
13-08-07 조회 1,109
13-08-07 조회 1,118
13-08-07 조회 1,051
13-08-07 조회 1,773
13-08-07 조회 1,145
13-08-07 조회 1,653
13-08-07 조회 1,700
13-08-07 조회 1,746
13-08-07 조회 1,281
13-08-07 조회 1,652
13-08-07 조회 1,767
13-08-07 조회 1,561
13-08-06 조회 1,898
13-08-06 조회 1,705
13-08-06 조회 1,113
13-08-06 조회 1,020
13-08-06 조회 1,890