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,571
12년 전 조회 3,691
12년 전 조회 1,574
12년 전 조회 1,612
12년 전 조회 1,386
12년 전 조회 1,010
12년 전 조회 1,266
12년 전 조회 1,176
12년 전 조회 1,385
12년 전 조회 2,000
12년 전 조회 1,537
12년 전 조회 1,393
12년 전 조회 3,923
12년 전 조회 1,548
12년 전 조회 877
12년 전 조회 1,577
12년 전 조회 662
12년 전 조회 940
12년 전 조회 1,332
12년 전 조회 1,224
12년 전 조회 5,192
12년 전 조회 2,548
12년 전 조회 1,813
12년 전 조회 650
12년 전 조회 2,259
12년 전 조회 855
12년 전 조회 1,175
12년 전 조회 887
12년 전 조회 3,391
12년 전 조회 810
12년 전 조회 3,698
12년 전 조회 1,384
12년 전 조회 1,665
12년 전 조회 2,281
12년 전 조회 2,342
12년 전 조회 605
12년 전 조회 679
12년 전 조회 1,335
12년 전 조회 651
12년 전 조회 828
12년 전 조회 6,609
12년 전 조회 581
12년 전 조회 870
12년 전 조회 516
12년 전 조회 558
12년 전 조회 821
12년 전 조회 763
12년 전 조회 1,757
12년 전 조회 1,747
12년 전 조회 1,390
12년 전 조회 5,261
12년 전 조회 1,530
12년 전 조회 1,628
12년 전 조회 983
12년 전 조회 1,999
12년 전 조회 1,396
12년 전 조회 3,065
12년 전 조회 2,578
12년 전 조회 1,926
12년 전 조회 2,398
12년 전 조회 1,881
12년 전 조회 1,658
12년 전 조회 1,052
12년 전 조회 1,166
12년 전 조회 5,583
12년 전 조회 2,631
12년 전 조회 3,109
12년 전 조회 1,771
12년 전 조회 1,483
12년 전 조회 832
12년 전 조회 1,844
12년 전 조회 949
12년 전 조회 1,526
12년 전 조회 2,794
12년 전 조회 2,359
12년 전 조회 1,707
12년 전 조회 6,684
12년 전 조회 2,519
12년 전 조회 729
12년 전 조회 685
12년 전 조회 1,433
12년 전 조회 2,077
12년 전 조회 916
12년 전 조회 726
12년 전 조회 1,362
12년 전 조회 1,496
12년 전 조회 724
12년 전 조회 1,151
12년 전 조회 1,423
12년 전 조회 811
12년 전 조회 1,106
12년 전 조회 3,695
12년 전 조회 1,442
12년 전 조회 983
12년 전 조회 875
12년 전 조회 1,240
12년 전 조회 1,474
12년 전 조회 4,264
12년 전 조회 5,595
12년 전 조회 722
🐛 버그신고