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,576
12년 전 조회 3,696
12년 전 조회 1,580
12년 전 조회 1,615
12년 전 조회 1,393
12년 전 조회 1,014
12년 전 조회 1,270
12년 전 조회 1,183
12년 전 조회 1,387
12년 전 조회 2,003
12년 전 조회 1,542
12년 전 조회 1,400
12년 전 조회 3,925
12년 전 조회 1,554
12년 전 조회 883
12년 전 조회 1,584
12년 전 조회 669
12년 전 조회 947
12년 전 조회 1,338
12년 전 조회 1,232
12년 전 조회 5,200
12년 전 조회 2,553
12년 전 조회 1,817
12년 전 조회 653
12년 전 조회 2,267
12년 전 조회 859
12년 전 조회 1,177
12년 전 조회 891
12년 전 조회 3,394
12년 전 조회 811
12년 전 조회 3,705
12년 전 조회 1,387
12년 전 조회 1,669
12년 전 조회 2,285
12년 전 조회 2,344
12년 전 조회 613
12년 전 조회 681
12년 전 조회 1,336
12년 전 조회 654
12년 전 조회 834
12년 전 조회 6,614
12년 전 조회 586
12년 전 조회 876
12년 전 조회 522
12년 전 조회 563
12년 전 조회 832
12년 전 조회 767
12년 전 조회 1,759
12년 전 조회 1,751
12년 전 조회 1,396
12년 전 조회 5,266
12년 전 조회 1,535
12년 전 조회 1,632
12년 전 조회 985
12년 전 조회 2,001
12년 전 조회 1,402
12년 전 조회 3,067
12년 전 조회 2,580
12년 전 조회 1,930
12년 전 조회 2,403
12년 전 조회 1,886
12년 전 조회 1,661
12년 전 조회 1,057
12년 전 조회 1,173
12년 전 조회 5,585
12년 전 조회 2,636
12년 전 조회 3,112
12년 전 조회 1,773
12년 전 조회 1,485
12년 전 조회 838
12년 전 조회 1,851
12년 전 조회 956
12년 전 조회 1,530
12년 전 조회 2,800
12년 전 조회 2,363
12년 전 조회 1,710
12년 전 조회 6,686
12년 전 조회 2,522
12년 전 조회 731
12년 전 조회 689
12년 전 조회 1,440
12년 전 조회 2,078
12년 전 조회 919
12년 전 조회 728
12년 전 조회 1,367
12년 전 조회 1,498
12년 전 조회 727
12년 전 조회 1,152
12년 전 조회 1,427
12년 전 조회 817
12년 전 조회 1,109
12년 전 조회 3,699
12년 전 조회 1,444
12년 전 조회 984
12년 전 조회 876
12년 전 조회 1,242
12년 전 조회 1,477
12년 전 조회 4,270
12년 전 조회 5,597
12년 전 조회 727
🐛 버그신고