잡스러운 보드 -->> 그누보드로 변환 에러 나는것좀 봐주실분^^

<?
$bo_table = "sub06_04"; // 코몬에 테이블이 들어가야 write 변수에값이들어감~
include_once("./_common.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
?>
잡스러운 보드 -> 그누보드로 변환 ver.1  by CHEONSIN<br>
<?
$sql = "select * from client_board where 1 order by idx";
$result = sql_query($sql);
$data_path = $g4[path]."/data/file/$bo_table";
//$view = sql_fetch($sql);
//echo $view[title]; exit;
//매장이 어디에있나요?/ 나옴

while ($row = sql_fetch_array($result)) {
 $html = "html1"; 
 
 $wr_num = get_next_num($write_table);
 /*if($row[attfiles]) {
  $attfiles = str_replace(":", "", $row[attfiles]);
 } else {
  $attfiles = "";
 }*/
 //if($row[secret] == "y") $secret = "secret";
 //else $secret = "secret";
 $subject = strip_tags($row[title]);
 $subject = str_replace("'", '"', $subject);
 $comment = str_replace("'", '"', $row[content]);
 $comment = str_replace("\n", "<br>", $row[content]);
 $wr_password = sql_password($row[pwd]); 
 $wr_email = $row[usermail];
?>
 <!--tr>
  <td><?=$row[idx]?></td>
  <td><?=$attfiles?></td>
 </tr-->
 <!---->
<?
 $sql = " insert into $write_table
                set wr_num = '".$row[num]."',
                    wr_id = '".$row[idx]."',
     wr_reply = '$wr_reply',
                    wr_comment = 0,
                    ca_name = '$ca_name',
                    wr_option = '$html,$secret,$mail',
                    wr_subject = '$subject',
                    wr_content = '$comment',
                    wr_link1 = '$wr_link1',
                    wr_link2 = '$wr_link2',
                    wr_link1_hit = 0,
                    wr_link2_hit = 0,
                    wr_trackback = '$wr_trackback',
                    wr_hit = '".$row[readnum]."',
                    wr_good = $wr_good',
                    wr_nogood = 0,
                    mb_id = '".$row[username]."',
                    wr_password = '$wr_password',
                    wr_name = '".$row[username]."',
                    wr_email = '$wr_email',
                    wr_homepage = '$wr_homepage',
                    wr_datetime = '".date("Y-m-d H:i:s", $row[w_date])."',
                    wr_last = '".date("Y-m-d H:i:s", $row[w_date])."',
                    wr_ip = '".$row[ipaddress]."' ";
    sql_query($sql);
 
 
>>에러코드
 
insert into g4_write_sub06_04 set wr_num = '1', wr_id = '3', wr_reply = '', wr_comment = 0, ca_name = '', wr_option = 'html1,,', wr_subject = '매장이 어디에 있나요?', wr_content = '안녕하세요
홈페이지 기념에 할인행사를 하신다고햇는데 베스트빈매장을 못보았는데요
어디어디에 있나요? 가보려고합니다 ', wr_link1 = '', wr_link2 = '', wr_link1_hit = 0, wr_link2_hit = 0, wr_trackback = '', wr_hit = '849', wr_good = ', wr_nogood = 0, mb_id = '장연숙', wr_password = '*A4B6157319038724E3560894F7F932C8886EBFCF', wr_name = '장연숙', wr_email = 'jayes@hanmail.net', wr_homepage = '', wr_datetime = '1970-01-01 09:33:25', wr_last = '1970-01-01 09:33:25', wr_ip = '220.117.245.184'
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 '장연숙', wr_password = '*A4B6157319038724E3560894F7F932C8886' at line 16
error file : /db.php
 
 
>> 나오는데요 뭐가 문제일까욤??
 
|

댓글 1개

작은 따옴표 하나가 빠졌네요.

wr_good = $wr_good',
=>
wr_good = '$wr_good',
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
13년 전 조회 3,278
13년 전 조회 744
13년 전 조회 1,301
13년 전 조회 1,076
13년 전 조회 721
13년 전 조회 7,726
13년 전 조회 1,096
13년 전 조회 1,746
13년 전 조회 746
13년 전 조회 1,081
13년 전 조회 913
13년 전 조회 1,884
13년 전 조회 3,313
13년 전 조회 1,529
13년 전 조회 3,232
13년 전 조회 1,408
13년 전 조회 3,850
13년 전 조회 1,399
13년 전 조회 897
13년 전 조회 1,864
13년 전 조회 2,646
13년 전 조회 1,566
13년 전 조회 1,375
13년 전 조회 3,131
13년 전 조회 1,157
13년 전 조회 717
13년 전 조회 1,613
13년 전 조회 846
13년 전 조회 5,168
13년 전 조회 825
13년 전 조회 1,213
13년 전 조회 809
13년 전 조회 830
13년 전 조회 954
13년 전 조회 1,766
13년 전 조회 1,568
13년 전 조회 1,298
13년 전 조회 1,503
13년 전 조회 3,656
13년 전 조회 762
13년 전 조회 1,654
13년 전 조회 1,476
13년 전 조회 618
13년 전 조회 742
13년 전 조회 620
13년 전 조회 8,351
13년 전 조회 837
13년 전 조회 1,641
13년 전 조회 1,311
13년 전 조회 744
13년 전 조회 487
13년 전 조회 3,723
13년 전 조회 537
13년 전 조회 688
13년 전 조회 1,742
13년 전 조회 1,245
13년 전 조회 1,290
13년 전 조회 995
13년 전 조회 940
13년 전 조회 698
13년 전 조회 1,244
13년 전 조회 842
13년 전 조회 1,678
13년 전 조회 1,016
13년 전 조회 2,689
13년 전 조회 554
13년 전 조회 2,229
13년 전 조회 2,608
13년 전 조회 4,374
13년 전 조회 939
13년 전 조회 1,168
13년 전 조회 1,341
13년 전 조회 1,161
13년 전 조회 1,164
13년 전 조회 2,822
13년 전 조회 1,247
13년 전 조회 1,008
13년 전 조회 1,132
13년 전 조회 1,126
13년 전 조회 807
13년 전 조회 1,695
13년 전 조회 2,078
13년 전 조회 1,365
13년 전 조회 960
13년 전 조회 932
13년 전 조회 826
13년 전 조회 1,565
13년 전 조회 2,588
13년 전 조회 1,295
13년 전 조회 1,588
13년 전 조회 1,110
13년 전 조회 1,131
13년 전 조회 1,334
13년 전 조회 859
13년 전 조회 840
13년 전 조회 850
13년 전 조회 1,182
13년 전 조회 1,263
13년 전 조회 1,011
13년 전 조회 780
🐛 버그신고