mysql_fetch_array() 오류...도와주세요...

갑자기 오류가 납니다.
 
몇일전부터 일시적으로 그랬다가 이젠 아예 이러네요...
원인과 해결방법이 뭔지 부탁드립니다.
 
"
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/waterfront/www/xe/club/cb_member_up.php on line 102
"
 
 
 
 
 
 
<?
include_once "./_common.php";
if (!$cb[cb_id]) {
    error_msg("{$cb_id} 클럽이 존재하지 않습니다.");
}
if (!$is_manager) {
    alert("스텝권한 이상만 접근 가능합니다.");
}

$g4[title] = "$cb[cb_name]:클럽회원관리 - $nc[nf_title]";
include_once "$nc[cb_path]/head.sub.php";
if (!$ssort) { $ssort = "a.cm_regdate"; }
if (!$sorder) { $sorder = "desc"; }
$sql_common = " $nc[tbl_member] as a, $g4[member_table] as b ";
$sql_order = " order by $ssort $sorder ";
$sql_where  = " where ( a.mb_id = '$mb_id' and a.cb_id = '$cb[cb_id]' )  ";
if ($stext) {
    $sql_where .= " and $sselect like '%$stext%' ";
}
$sql    = " select count(*) from $sql_common $sql_where $sql_order ";
//echo $sql."<br>";
$result = mysql_query($sql);
$row    = mysql_fetch_array($result);
$total_count = $row[0];
$rows  = 1;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; }    // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows;   // 시작 열을 구함
//$sql = " select *, date_format(cm_regdate, '%y.%m.%d %p %h:%i') as regdate,date_format(cm_logdate, '%y.%m.%d %p %h:%i') as logdate from $sql_common $sql_where $sql_order limit $from_record, $rows ";
$sql = "select *, date_format(cm_regdate, '%y.%m.%d %p %h:%i') as regdate,date_format(cm_logdate, '%y.%m.%d %p %h:%i') as logdate from $sql_common $sql_where $sql_order limit $from_record, $rows";
$result = mysql_query($sql);
//echo $sql."<br>";
//select *, date_format(cm_regdate, '%y.%m.%d %p %h:%i') as regdate, date_format(cm_logdate, '%y.%m.%d %p %h:%i') as logdate from nc_member as a, g4_member as b where ( a.mb_id = 'onlygolden' and a.cb_id = 'cb_kkstarbw' ) order by a.cm_regdate desc limit 0, 1
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width="30"><img src="./images/box_list_t01.gif"></td>
  <td width="100%" background="./images/box_list_bg1.gif"><strong> 회원 등급변경 </strong></td>
  <td width="50"><img src="./images/box_list_t02.gif"></td>
 </tr>
 <tr>
  <td colspan="3" height="12" background="./images/box_list_bg2.gif"></td>
 </tr>
</table>
<div style="height:10px; overflow:hidden;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="7"><table width="100%" border="0" cellspacing="0" cellpadding="0">
   <colgroup><col /><col width="50px" /><col width="100px" /><col width="63px" /></colgroup>
   <form name="fcbsearch" method="post" action="./cm_member_list.php">
      <input type="hidden" name="cb_id" value="<?=$cb[cb_id]?>">
        <tr>
          <td>(<?=$total_count?>)</td>
          <td align="right"><select name="sselect">
            <option value="a.mb_id">아이디</option>
          </select></td>
          <td align="center"><input name="stext" type="text" size="20" style="width:100%" itemname="검색어"></td>
          <td align="right"><input type="image" src="images/cb_search_btn.gif" name="Submit" value="검 색"></td>
        </tr>
      </form>
    </table></td>
  </tr>
  <tr>
    <td height="3" colspan="7"></td>
  </tr>
  <tr bgcolor="#CCCCCC">
    <td height="3" colspan="7"></td>
  </tr>
  <tr align="center" bgcolor="#f5f5f5">
  <form name="fcmmblevel" method="post" action="./cm_member_list.update2.php">
    <input type="hidden" name="exec"  value="">
    <input type="hidden" name="doc" value="<?=$doc?>">
    <input type="hidden" name="cb_id" value="<?=$cb[cb_id]?>">
    <input type="hidden" name="page" value="<?=$page?>">
    <td width="40" height="25" class="list"><input name="chkall" type="checkbox" id="chkall" value="checkbox" onClick="check_all(this.form);"></td>
    <td align="left" class="listsub">닉네임</td>
    <td class="listsub">회원등급</td>
    <td class="listsub">가입일</td>
    <td class="listsub">최근방문일</td>
    <td class="listsub">클럽포인트</td>
    <td class="listsub">방문수</td>
  </tr>
  <tr bgcolor="#EEEEEE">
    <td height="1" colspan="7"></td>
  </tr>
  <?
   /* for ($i=0; $row=mysql_fetch_array($result); $i++) {
        $mb_homepage  = get_text(addslashes($row[mb_homepage]));
       $tmp_name     = get_text(cut_str($row[mb_nick], $config[cf_cut_name])); // 설정된 자리수 만큼만 이름 출력
       $mb_name      = get_sideview($row[mb_id], $tmp_name, $row[mb_email], $mb_homepage); */
     for ($i=0; $row=mysql_fetch_array($result); $i++) {
        $mb_homepage  = get_text(addslashes($row[mb_homepage]));
       $tmp_name     = get_text(cut_str($row[mb_nick], $config[cf_cut_name])); // 설정된 자리수 만큼만 이름 출력
       $mb_name      = get_sideview($row[mb_id], $tmp_name, $row[mb_email], $mb_homepage);
  ?>
  <tr bgcolor="#EEEEEE">
    <td height="1" colspan="7"></td>
  </tr>
  <tr>
    <td width="40" height="25" align="center" class="list">
      <? if ($row[mb_id] !== $cb[cb_manager]) { ?>
          <input name="chk[]" type="checkbox" id="chk[]" value="<?=$i?>" checked="checked"><input type="hidden" name="mb_id" value="<?=$_REQUEST[mb_id]?>">
      <? } ?>
    </td>
 <?
 $que = "select a.cm_1 as cm_1,b.mb_nick as mb_nick from nc_member a, g4_member b  where a.mb_id='$_REQUEST[mb_id]' and b.mb_id=a.mb_id and a.cb_id='$cb[cb_id]' limit 1";
 $result = mysql_query($que);
 $rw = mysql_fetch_array($result);
 if($rw[cm_1]){
  $nick_name=$rw[cm_1];
 }else{
  $nick_name=$rw[mb_nick];
 }
 ?>
    <td height="25" class="listtext"><?=$nick_name?>(<?=$_REQUEST['mb_id']?>)</td>
    <td height="25" align="center" class="list">
      <? if ($row[mb_id] == $cb[cb_manager]) { ?>
          <?
              $sql1 = " select ml_name from $nc[tbl_mb_level]
                       where cb_id = '$cb[cb_id]' and cm_level='$row[cm_level]' ";
              $ml = sql_fetch($sql1);
              echo $ml[ml_name];
          ?>
      <? } else { ?>
      <select name="cm_level">
      <?
        $sql1     = " select *
                        from $nc[tbl_mb_level]
                       where cb_id = '$cb[cb_id]'
                    order by cm_level asc ";
        $result1  = mysql_query($sql1);
        for ($k=0; $ml=mysql_fetch_array($result1); $k++) {
            $selected = "";
            if ($ml[cm_level] == $row[cm_level]) { $selected = "selected"; }
            echo "<option value='$ml[cm_level]' $selected>$ml[ml_name]</option>\n";
        }
      ?>
      </select>
      <? } ?>
    </td>
    <td height="25" align="center" class="tahoma11 list"><?=$row[regdate]?></td>
    <td height="25" align="center" class="tahoma11 list"><?=$row[logdate]?></td>
    <td height="25" align="center" class="tahoma11 list"><?=$row[cm_point]?></td>
    <td height="25" align="center" class="tahoma11 list"><?=$row[cm_visit]?></td>
  </tr>
  <?
  $ask = explode("|", $row[cm_query]);
  $reply = explode("|", $row[cm_reply]);
  if ($ask[0]) {
  ?>
  <tr>
    <td width="40" height="25" align="center" class="list">&nbsp;</td>
    <td colspan=5>
    <?
        $ask_count = count($ask) - 1;
        for ($m=0; $m < $ask_count; $m++) {
            echo "(" . $ask[$m] . ") " . $reply[$m] . "&nbsp;&nbsp;&nbsp;";
        }
    ?>
    </td>
  </tr>
  <? } ?>
  <?
    }
   
    if ($i == 0) {
  echo "<tr><td height='100' align='center' colspan='10'>검색 결과가 없습니다.</td></tr>";
 }
  ?>
  <tr bgcolor="#CCCCCC">
    <td height="2" colspan="7"></td>
  </tr>
  <tr align="right">
    <td colspan="10"><table border="0" width="100%">
        <tr>
          <td style="padding:5px 10px 5px 10px;"><a href="#" onClick="btn_check('update');"><img src="./images/btn_confirm.gif" width="90" height="21" border="0"></td>
          <td align="right">
            <?
    $pagelist = get_paging($rows, $page, $total_page, "./cm_member_list.php?cb_id=$cb[cb_id]". $qstr. "&page=");
    if ($pagelist) {
        echo "<p><table width=100% cellpadding=3 cellspacing=1><tr><td align=right>$pagelist</td></tr></table>\n";
    }
   ?>
    </td>
  </tr>
    </table></td>
  </tr>
  </form>
</table>
<br><br><br><br><br>
<script language="JavaScript" type="text/JavaScript">
 
 <?
 if ($stext) {
     echo "document.fcbsearch.stext.value    = '$stext';";
     echo "document.fcbsearch.sselect.value  = '$sselect';";
    }
    ?>
     
 function check_all(f)
 {
     var chk = document.getElementsByName("chk[]");
 
     for (i=0; i<chk.length; i++)
         chk[i].checked = f.chkall.checked;
 }
 
 function btn_check(act)
 {
     f = document.fcmmblevel;
    
     if (act == "update") // 선택수정
     {
         f.exec.value = act;
         str = "수정";
     }
     else
         return;
 
     var chk = document.getElementsByName("chk[]");
     var bchk = false;
 
     for (i=0; i<chk.length; i++)
     {
         if (chk[i].checked)
             bchk = true;
     }
 
     if (!bchk)
     {
         alert(str + "할 자료를 하나 이상 선택하세요.");
         return;
     }
     f.submit();
 }
</script>
<?
include "$nc[cb_path]/tail.sub.php";
?>
|

댓글 2개

추출된 데이터가 없어서 나는거 같은데
쿼리를 db 에서 직접 실행 해보세요.
실제로 데이터가 존재해도 db 장애로 데이터 추출이 안되면 나올수도 있고
감사합니다^^
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
12년 전 조회 1,572
12년 전 조회 3,694
12년 전 조회 1,577
12년 전 조회 1,612
12년 전 조회 1,388
12년 전 조회 1,012
12년 전 조회 1,266
12년 전 조회 1,179
12년 전 조회 1,386
12년 전 조회 2,001
12년 전 조회 1,539
12년 전 조회 1,394
12년 전 조회 3,923
12년 전 조회 1,549
12년 전 조회 879
12년 전 조회 1,577
12년 전 조회 663
12년 전 조회 943
12년 전 조회 1,334
12년 전 조회 1,226
12년 전 조회 5,195
12년 전 조회 2,550
12년 전 조회 1,814
12년 전 조회 650
12년 전 조회 2,261
12년 전 조회 857
12년 전 조회 1,175
12년 전 조회 890
12년 전 조회 3,391
12년 전 조회 810
12년 전 조회 3,700
12년 전 조회 1,385
12년 전 조회 1,665
12년 전 조회 2,283
12년 전 조회 2,344
12년 전 조회 609
12년 전 조회 679
12년 전 조회 1,335
12년 전 조회 651
12년 전 조회 831
12년 전 조회 6,609
12년 전 조회 583
12년 전 조회 872
12년 전 조회 518
12년 전 조회 559
12년 전 조회 823
12년 전 조회 764
12년 전 조회 1,758
12년 전 조회 1,748
12년 전 조회 1,394
12년 전 조회 5,262
12년 전 조회 1,532
12년 전 조회 1,630
12년 전 조회 985
12년 전 조회 2,000
12년 전 조회 1,399
12년 전 조회 3,066
12년 전 조회 2,580
12년 전 조회 1,928
12년 전 조회 2,399
12년 전 조회 1,883
12년 전 조회 1,658
12년 전 조회 1,054
12년 전 조회 1,167
12년 전 조회 5,584
12년 전 조회 2,633
12년 전 조회 3,110
12년 전 조회 1,771
12년 전 조회 1,483
12년 전 조회 833
12년 전 조회 1,848
12년 전 조회 950
12년 전 조회 1,528
12년 전 조회 2,797
12년 전 조회 2,360
12년 전 조회 1,709
12년 전 조회 6,684
12년 전 조회 2,520
12년 전 조회 730
12년 전 조회 686
12년 전 조회 1,436
12년 전 조회 2,078
12년 전 조회 917
12년 전 조회 727
12년 전 조회 1,365
12년 전 조회 1,498
12년 전 조회 726
12년 전 조회 1,151
12년 전 조회 1,423
12년 전 조회 812
12년 전 조회 1,107
12년 전 조회 3,696
12년 전 조회 1,443
12년 전 조회 983
12년 전 조회 875
12년 전 조회 1,241
12년 전 조회 1,475
12년 전 조회 4,266
12년 전 조회 5,595
12년 전 조회 724
🐛 버그신고