첨부파일 갯수 늘리는 소스수정하다가 sql에러가 났어요. 도와주세요~

여기 게시판에서 검색을 해보니 첨부파일 늘리는 방법이 있길래 그걸 보고
config, sql_write.sql, gbupdate.php 파일을 아래처럼 수정을 했습니다.

그런데 테스트를 해보려고 글쓰기를 하면 첨부파일은 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'

원인을 아시는 분이 계시면 답변 부탁드립니다.
혹시 phpadmin에서 sql명령어를 쳐야 된다면 어떤 것을 쳐야하는지 알려주시면 감사드리겠습니다.

게시판 검색으로는 찾기가 어렵네요.
꼭 부탁드립니다. ^^

1. 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',

2. 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군데 수정했음
|

댓글 2개

phpMyAdmin에서 쿼리 실행부분에서
"desc 위의테이블명"해서 나온 결과에 wr_file5가 있는 확인하십시오
답변 감사드립니다. 그런데 무슨 말씀인지 모르겠어요. 제가 sql은 전혀 할 줄 몰라서요.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누3질답

+
제목 글쓴이 날짜 조회
20년 전 조회 1,574
20년 전 조회 1,436
20년 전 조회 1,513
20년 전 조회 1,396
20년 전 조회 1,380
20년 전 조회 1,461
20년 전 조회 2,830
20년 전 조회 1,274
20년 전 조회 1,406
20년 전 조회 1,528
20년 전 조회 1,500
20년 전 조회 1,263
20년 전 조회 1,606
20년 전 조회 1,368
20년 전 조회 1,467
20년 전 조회 1,340
20년 전 조회 1,315
20년 전 조회 1,478
20년 전 조회 1,280
20년 전 조회 1,221
🐛 버그신고