Sql 오려가 납니다... 당췌 뭐가 문젠지... 정보
Sql 오려가 납니다... 당췌 뭐가 문젠지...
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
휴, 자잘한 문제때문에 하루하루가 다 가네요.
오늘은 잘되던 developer.lib.php 를 어디를 건드렸더니 이상하게 갑자기 sql 문구가 뜹니다.
안에있는 내용은
function submenu($skin_dir="", $gr_id="", $bo_table=""){//게시판에서 카테고리별 최신글 추출
global $config;
global $g4;
if ($skin_dir)
$submenu_skin_path = "$g4[path]/skin/submenu/$skin_dir";
else
$submenu_skin_path = "$g4[path]/skin/submenu/$config[cf_latest_skin]";
$excgr = "('no', 'none', 'not', 'null')";
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_9, a.gr_10, b.mb_id FROM $g4[group_table] AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0' and a.gr_1 not in " . $excgr . " ORDER BY a.gr_1";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++){
$gSubject = ($row['gr_id'] == $gr_id)?"<span style='color:#FFFF00;'>" .$row['gr_subject']."</span>":"<span>" .$row['gr_subject']."</span>";//그룹제목 - 해당그룹은 #323232 나머지는 #FFFFFF
$gLink = (!empty($row['gr_10']))?$row['gr_10']:$g4['bbs_path'].'/'.'group.php?gr_id=' .$row['gr_id'];//그룹링크 - 별도링크 필요하면 gr_10 필드에 전체 url 입력
$sqlb = " select bo_subject, bo_table, bo_9, bo_10 from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') order by bo_order_search";
$resultb = sql_query($sqlb);
for ($j=0; $rowb=sql_fetch_array($resultb); $j++) {
$bSubject = ($rowb['bo_table'] == $bo_table)?"<span style='font-weight:bold;'>".cut_str(get_text($rowb['bo_subject']),100,"")."</span>":"<span>".cut_str(get_text($rowb['bo_subject']), 100,"")."</span>";//게시판제목 - 해당게시판은 #323232 나머지는 #323232
$bLink = (!empty($rowb['bo_10']))?$rowb['bo_10']:$g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];//게시판링크 - 별도링크 필요하면 bo_10 필드에 전체 url 입력
$listc = array();
$sqlc = " select * from {$g4[board_table]} where bo_table = '$rowb[bo_table]'";
$boardc = sql_fetch($sqlc);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
$sqld = " select bo_category_list from $g4[board_table] where bo_table = '$rowb[bo_table]' order by bo_table ";
$resultd = sql_fetch($sqld);
$cat_row = explode("|", $resultd[bo_category_list]);
for ($k=0; $k<count($cat_row); $k++) { //@@@@@@@@@@@@@@@@@@@
// $sqlc = " select * from $tmp_write_table where ca_name='".$cat_row[$k]."' and wr_is_comment = 0".$GLOBALS["ssh_wr_nogood"]." order by wr_id desc limit 0, $rowb "; //##add06-04-12
$cat_href[$k] = urlencode($cat_row[$k]);
$sk_url = $_SERVER['REQUEST_URI'];
$cSubject = ($cat_href[$k] == strstr($sk_url, $cat_href[$k]))?"<span style='font-weight:bold;'>".cut_str(get_text($cat_row[$k]),100,"")."</span>":"<span>".cut_str(get_text($cat_row[$k]), 100,"")."</span>";//게시판제목 - 해당게시판은 #323232 나머지는 #323232
echo "<li><a href='" . $bLink . "&sca=" . $cat_href[$k] . "'>" . $cSubject . "</a></li>\n";
}
}
ob_start();
include "$submenu_skin_path/submenu.skin.php";
$content = ob_get_contents();
ob_end_clean();
$k++;
}
return $content;
}
이거 뿐인데
자꾸
select bo_subject, bo_table, bo_9, bo_10 from g4_board where (bo_list_level <= ) and (gr_id = 'old_lit') order by bo_order_search
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 ') and (gr_id = 'old_lit') order by bo_order_search' at line 1
error file : /ko/index.php
이라는 에러가 나네요... 뭐가 잘못된건가요?
오류 주소 :
휴, 자잘한 문제때문에 하루하루가 다 가네요.
오늘은 잘되던 developer.lib.php 를 어디를 건드렸더니 이상하게 갑자기 sql 문구가 뜹니다.
안에있는 내용은
function submenu($skin_dir="", $gr_id="", $bo_table=""){//게시판에서 카테고리별 최신글 추출
global $config;
global $g4;
if ($skin_dir)
$submenu_skin_path = "$g4[path]/skin/submenu/$skin_dir";
else
$submenu_skin_path = "$g4[path]/skin/submenu/$config[cf_latest_skin]";
$excgr = "('no', 'none', 'not', 'null')";
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_9, a.gr_10, b.mb_id FROM $g4[group_table] AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0' and a.gr_1 not in " . $excgr . " ORDER BY a.gr_1";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++){
$gSubject = ($row['gr_id'] == $gr_id)?"<span style='color:#FFFF00;'>" .$row['gr_subject']."</span>":"<span>" .$row['gr_subject']."</span>";//그룹제목 - 해당그룹은 #323232 나머지는 #FFFFFF
$gLink = (!empty($row['gr_10']))?$row['gr_10']:$g4['bbs_path'].'/'.'group.php?gr_id=' .$row['gr_id'];//그룹링크 - 별도링크 필요하면 gr_10 필드에 전체 url 입력
$sqlb = " select bo_subject, bo_table, bo_9, bo_10 from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') order by bo_order_search";
$resultb = sql_query($sqlb);
for ($j=0; $rowb=sql_fetch_array($resultb); $j++) {
$bSubject = ($rowb['bo_table'] == $bo_table)?"<span style='font-weight:bold;'>".cut_str(get_text($rowb['bo_subject']),100,"")."</span>":"<span>".cut_str(get_text($rowb['bo_subject']), 100,"")."</span>";//게시판제목 - 해당게시판은 #323232 나머지는 #323232
$bLink = (!empty($rowb['bo_10']))?$rowb['bo_10']:$g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];//게시판링크 - 별도링크 필요하면 bo_10 필드에 전체 url 입력
$listc = array();
$sqlc = " select * from {$g4[board_table]} where bo_table = '$rowb[bo_table]'";
$boardc = sql_fetch($sqlc);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
$sqld = " select bo_category_list from $g4[board_table] where bo_table = '$rowb[bo_table]' order by bo_table ";
$resultd = sql_fetch($sqld);
$cat_row = explode("|", $resultd[bo_category_list]);
for ($k=0; $k<count($cat_row); $k++) { //@@@@@@@@@@@@@@@@@@@
// $sqlc = " select * from $tmp_write_table where ca_name='".$cat_row[$k]."' and wr_is_comment = 0".$GLOBALS["ssh_wr_nogood"]." order by wr_id desc limit 0, $rowb "; //##add06-04-12
$cat_href[$k] = urlencode($cat_row[$k]);
$sk_url = $_SERVER['REQUEST_URI'];
$cSubject = ($cat_href[$k] == strstr($sk_url, $cat_href[$k]))?"<span style='font-weight:bold;'>".cut_str(get_text($cat_row[$k]),100,"")."</span>":"<span>".cut_str(get_text($cat_row[$k]), 100,"")."</span>";//게시판제목 - 해당게시판은 #323232 나머지는 #323232
echo "<li><a href='" . $bLink . "&sca=" . $cat_href[$k] . "'>" . $cSubject . "</a></li>\n";
}
}
ob_start();
include "$submenu_skin_path/submenu.skin.php";
$content = ob_get_contents();
ob_end_clean();
$k++;
}
return $content;
}
이거 뿐인데
자꾸
select bo_subject, bo_table, bo_9, bo_10 from g4_board where (bo_list_level <= ) and (gr_id = 'old_lit') order by bo_order_search
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 ') and (gr_id = 'old_lit') order by bo_order_search' at line 1
error file : /ko/index.php
이라는 에러가 나네요... 뭐가 잘못된건가요?
댓글 전체
버젼 문제라고, 표시하네요.
where (bo_list_level <= ) and (gr_id = 'old_lit') order by bo_order_search
그런데. 저도 지식이 짧은지. (bo_list_level <= ) 이 부분이 돵췌 이해가 안가네요, ㅡ,ㅡ 죄송.
where (bo_list_level <= ) and (gr_id = 'old_lit') order by bo_order_search
그런데. 저도 지식이 짧은지. (bo_list_level <= ) 이 부분이 돵췌 이해가 안가네요, ㅡ,ㅡ 죄송.

읽기 레벨(권한)을 0이 아닌 빈칸으로 했나 봅니다.