그누토크 오류 해결 방법 좀 알려주세요 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

그누토크 오류 해결 방법 좀 알려주세요 정보

그누토크 오류 해결 방법 좀 알려주세요

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://cutiey.com/y/talk/

Warning: Division by zero in /home1/cutiey/public_html/y/talk/plaza.php on line 24

Warning: Division by zero in /home1/cutiey/public_html/y/talk/plaza.php on line 24

select * from g4_talk where 1 and secret=0 order by id desc limit 0,

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 '' at line 1

error file : /y/talk/index.php


해결방법 좀 알려주세요.ㅜㅜ


<?
include('./_common.php');
include('./config.php');

// 카테고리
$category = array();
$qry = sql_query("select * from {$g4['talk_category_table']} order by rank");
while ($res = sql_fetch_array($qry)) array_push($category, $res);

// 페이지 번호 초기화
if (empty($page)) $page = 1; else $page = (int)$page;

// 역시 한글 짱
$week_array = array(1=>'월요일',2=>'화요일',3=>'수요일',4=>'목요일',5=>'금요일',6=>'토요일',0=>'일요일');
$noon_array = array('am'=>'오전','pm'=>'오후');

$page_size = $g4['plaza_page_size'];

if ($c_id)
    $sql_category = " and c_id='{$c_id}'";

$total_post = sql_fetch("select count(*) as cnt from {$g4['talk_table']} where 1 {$sql_category} and secret=0 ");
$total_post = $total_post['cnt'];
$total_page = (int)($total_post/$page_size) + ($total_post%$page_size==0 ? 0 : 1);
$page_start = $page_size * ( $page - 1 );

$paging = get_paging(10, $page, $total_page, "plaza.php?t_id={$t_id}&page=");

$sql = "select * from {$g4['talk_table']} where 1 {$sql_category} and secret=0 order by id desc limit {$page_start}, {$page_size}";
$qry = sql_query($sql);

$plaza = array();

while ($res = sql_fetch_array($qry)) {

    $res2 = sql_fetch("select mb_id from {$g4['talk_info_table']} where id='{$res['t_id']}'");
    if (!empty($res2)) {
        $res['image'] = "{$g4['path']}/data/talk/profile_image/{$res2['mb_id']}";
        if (!file_exists($res['image']))
            $res['image'] = "{$gnutalk_skin_path}/img/profile.gif";
    }

    $res['content'] = get_talk($res['content']);

    $regdate = strtotime($res['regdate'].' '.$res['regtime']);
    $res['week'] = $week_array[date('w', $regdate)];
    $res['date'] = date('m-d', $regdate);
    $res['time'] = date('H:i', $regdate);
    $res['noon'] = $noon_array[date('a', $regdate)];
    if ($res['regdate']==date('Y-m-d'))
        $res['regdate'] = $res['time'];
    else
        $res['regdate'] = $res['date'];

    array_push($plaza, $res);   
}


// 상단 파일 include
if (file_exists($g4['talk_head_file']))
    @include_once($g4['talk_head_file']);
else
    @include_once("{$g4['path']}/head.sub.php");

include_once("{$gnutalk_skin_path}/head.skin.php");
include_once("{$gnutalk_skin_path}/plaza.skin.php");
include_once("{$gnutalk_skin_path}/tail.skin.php");

// 하단 파일 include
if (file_exists($g4['talk_tail_file']))
    @include_once($g4['talk_tail_file']);
else
    @include_once("{$g4['path']}/tail.sub.php");

?>

여기서 어디를 수정해야 하나요.ㅜㅜ

댓글 전체

select * from g4_talk where 1 and secret=0 order by id desc limit 0,

where wr_1 이신가요 ? --ㅎ ;;

이 구문에 보시면
WHERE 다음 field명이  안보입니다 -_-;;

어느 필드를 쓰실지 정의하시지 않으셨기 때문에 갯수(?) 전체수 가 몇개인지 알수가 없서서
Division by zero  가 나옵니다

사용 필드명을 정의해 보십시오.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT