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,561
12년 전 조회 3,687
12년 전 조회 1,568
12년 전 조회 1,607
12년 전 조회 1,378
12년 전 조회 1,003
12년 전 조회 1,255
12년 전 조회 1,166
12년 전 조회 1,377
12년 전 조회 1,994
12년 전 조회 1,531
12년 전 조회 1,382
12년 전 조회 3,916
12년 전 조회 1,537
12년 전 조회 870
12년 전 조회 1,568
12년 전 조회 660
12년 전 조회 934
12년 전 조회 1,324
12년 전 조회 1,216
12년 전 조회 5,187
12년 전 조회 2,542
12년 전 조회 1,807
12년 전 조회 648
12년 전 조회 2,254
12년 전 조회 850
12년 전 조회 1,166
12년 전 조회 881
12년 전 조회 3,385
12년 전 조회 804
12년 전 조회 3,691
12년 전 조회 1,378
12년 전 조회 1,661
12년 전 조회 2,277
12년 전 조회 2,338
12년 전 조회 597
12년 전 조회 673
12년 전 조회 1,331
12년 전 조회 643
12년 전 조회 824
12년 전 조회 6,604
12년 전 조회 578
12년 전 조회 869
12년 전 조회 511
12년 전 조회 553
12년 전 조회 815
12년 전 조회 758
12년 전 조회 1,753
12년 전 조회 1,744
12년 전 조회 1,384
12년 전 조회 5,252
12년 전 조회 1,523
12년 전 조회 1,625
12년 전 조회 977
12년 전 조회 1,993
12년 전 조회 1,393
12년 전 조회 3,056
12년 전 조회 2,566
12년 전 조회 1,922
12년 전 조회 2,396
12년 전 조회 1,879
12년 전 조회 1,652
12년 전 조회 1,049
12년 전 조회 1,163
12년 전 조회 5,580
12년 전 조회 2,626
12년 전 조회 3,105
12년 전 조회 1,763
12년 전 조회 1,477
12년 전 조회 829
12년 전 조회 1,840
12년 전 조회 944
12년 전 조회 1,521
12년 전 조회 2,789
12년 전 조회 2,355
12년 전 조회 1,699
12년 전 조회 6,679
12년 전 조회 2,508
12년 전 조회 728
12년 전 조회 681
12년 전 조회 1,431
12년 전 조회 2,074
12년 전 조회 916
12년 전 조회 723
12년 전 조회 1,356
12년 전 조회 1,490
12년 전 조회 717
12년 전 조회 1,142
12년 전 조회 1,417
12년 전 조회 806
12년 전 조회 1,101
12년 전 조회 3,688
12년 전 조회 1,438
12년 전 조회 979
12년 전 조회 865
12년 전 조회 1,232
12년 전 조회 1,467
12년 전 조회 4,253
12년 전 조회 5,588
12년 전 조회 717
🐛 버그신고