운영자님 답변 좀 다시 해주셔요. ^-^ sql 에러 관련 > 그누3질답

그누3질답

운영자님 답변 좀 다시 해주셔요. ^-^ sql 에러 관련 정보

운영자님 답변 좀 다시 해주셔요. ^-^ sql 에러 관련

본문

http://sir.co.kr/bbs/board.php?bo_table=g3_qa&wr_id=35306&page=2

게시판에 답변을 달아주셨는데 제가 php는 잘 몰라서요.
어느 부분을 찾아서 어떤 쿼리를 입력해야하는지 알려주시면 감사드리겠습니다.

추석 연휴 잘 보내세요...

===================================================
원문

첨부파일을 2개에서 6개로 늘리려고 소스 수정을 했더니 첨부파일은 6개로
늘어났지만 막상 자료들을 올리면 .....
wr_subject = 'test', wr_content = 'test', wr_link1 = '', wr_link2 = '', wr_link3 = '', wr_link4 = '', wr_file1 = '56c735b3_dfbd7a7df8ce9be1ad358b6e75638a8a.jpg', wr_file2 = '552c6c38_7b229068276ed12b73357a84d3881e2a.jpg', wr_file3 = '5f4d8506_b3842a5c8f0e7a70e73844c873e06fc5.jpg', wr_file4 = '56a2ee47_65db9eaa1e983822502a756d4d17679c.jpg', wr_file5 = 'b037fab7_a8b09c3109f4764338c1c9b3abd9bbf5.jpg', wr_file6 = 'e9e12adc_fbe3fe01055ac6971a133778425f2825.jpg', wr_file1_source = 'footdad1_16_m.jpg', wr_file2_source = 'footdad1_48_m.jpg', wr_file3_source = 'leeminkyu86_58_m.jpg', wr_file4_source = 'mayu.jpg', wr_file5_source = 'ps3.jpg', wr_file6_source = 'yumeoses_131.jpg', wr_file1_download = '0', wr_file2_download = '0', wr_file3_download = '0', wr_file4_download = '0', wr_file5_download = '0', wr_file6_download = '0',
...................
1054 : Unknown column 'wr_file5' in 'field list'  에러가 발생합니다.


수정한 소스
1. config.php 파일
  첨부파일갯수  2개 -> 6개
2. sql_write.sql

  wr_file1 varchar(255) NOT NULL default '',
  wr_file2 varchar(255) NOT NULL default '',
  wr_file3 varchar(255) NOT NULL default '',
  wr_file4 varchar(255) NOT NULL default '',
  wr_file5 varchar(255) NOT NULL default '',
  wr_file6 varchar(255) NOT NULL default '',
  wr_file1_source varchar(255) NOT NULL default '',
  wr_file2_source varchar(255) NOT NULL default '',
  wr_file3_source varchar(255) NOT NULL default '',
  wr_file4_source varchar(255) NOT NULL default '',
  wr_file5_source varchar(255) NOT NULL default '',
  wr_file6_source varchar(255) NOT NULL default '',
  wr_file1_download int(11) NOT NULL default '0',
  wr_file2_download int(11) NOT NULL default '0',
  wr_file3_download int(11) NOT NULL default '0',
  wr_file4_download int(11) NOT NULL default '0',
  wr_file5_download int(11) NOT NULL default '0',
  wr_file6_download int(11) NOT NULL default '0',

3. gbupdate.php

                    wr_file1 = '$upload[1]',
                    wr_file2 = '$upload[2]',
                    wr_file3 = '$upload[3]',
                    wr_file4 = '$upload[4]',
                    wr_file5 = '$upload[5]',
                    wr_file6 = '$upload[6]',
                    wr_file1_source = '$upload_source[1]',
                    wr_file2_source = '$upload_source[2]',
                    wr_file3_source = '$upload_source[3]',
                    wr_file4_source = '$upload_source[4]',
                    wr_file5_source = '$upload_source[5]',
                    wr_file6_source = '$upload_source[6]',
                    wr_file1_download = '0',
                    wr_file2_download = '0',
                    wr_file3_download = '0',
                    wr_file4_download = '0',
                    wr_file5_download = '0',
                    wr_file6_download = '0',  //2군데 수정했음
  • 복사

댓글 전체

Unknown column 'wr_file5' in 'field list 이부분은..
해당 게시판 테이블에 wr_file5필드가 있는지 확인을 먼저 해보세요..
정상적으로 폼에서.. 입력을 받아 디비에 자료를 입력시 해당 필드가 없는 문제입니다.
위 분의 말씀대로 db에 해당 필드가 모두 정상적으로 추가되어 있는지 확인해 보시고
이상없이 추가되어 있는데도 안된다면 쓰기/업데이트 파일을 올려보십시오.
© SIRSOFT
현재 페이지 제일 처음으로