급합니다 고수님들 부탁드립니다 채택완료
사이트에 멀티카테고리 사용중입니다
insert into tree_elements set Id = '15', name = '경비원닷컴', position = '0', ownerEl = '0', slave = '0 ', skin = '', hidden = ''
1054 : Unknown column 'skin' in 'field list'
error file : /adm/eztree-v2/utils/restore_execute.php
이런 에러가 납니다
--------------------------------------------------
restore_execute.php 내용은
include_once("./_common.php");
// 업로드 오류 확인 if(isset($_FILES['userfile']['error'])) { switch($_FILES['userfile']['error']) { case UPLOAD_ERR_OK: break; case UPLOAD_ERR_NO_FILE: alert("보내진 파일 없음"); echo('No file sent.'); case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: alert("파일 용량 초과"); echo('Exceeded filesize limit.'); default: alert("알수없는 오류"); echo('Unknown errors.'); } }
// 임시파일명 $tmp_name = $_FILES['userfile']['tmp_name'];
// 카테고리 내용 비움 $sql = " truncate tree_elements "; sql_query($sql);
// 카테고리 내용 등록 $fp = fopen($tmp_name,"r"); while( !feof($fp) ) { $doc_data = addslashes(fgets($fp)); $cols = explode("\t", $doc_data);
$sql = " insert into tree_elements set Id = '{$cols[0]}', name = '{$cols[1]}', position = '{$cols[2]}', ownerEl = '{$cols[3]}', slave = '{$cols[4]}', skin = '{$cols[5]}', hidden = '{$cols[6]}' "; sql_query($sql);
}
alert("정상적으로 처리되었습니다.", "../browse.php"); ?>
------------------------------------------------------------
어디를 수정해야 할까요?
답변 1개
</p>
<p> $sql = " insert into tree_elements
set Id = '{$cols[0]}',
name = '{$cols[1]}',
position = '{$cols[2]}',
ownerEl = '{$cols[3]}',
slave = '{$cols[4]}',
hidden = '{$cols[6]}' ";
sql_query($sql);</p>
<p>
로 해보세요
skin 컬럼이 없어서 나는 오류입니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인