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,600
12년 전 조회 3,722
12년 전 조회 1,602
12년 전 조회 1,630
12년 전 조회 1,409
12년 전 조회 1,029
12년 전 조회 1,289
12년 전 조회 1,202
12년 전 조회 1,401
12년 전 조회 2,025
12년 전 조회 1,558
12년 전 조회 1,414
12년 전 조회 3,945
12년 전 조회 1,574
12년 전 조회 904
12년 전 조회 1,604
12년 전 조회 688
12년 전 조회 965
12년 전 조회 1,353
12년 전 조회 1,256
12년 전 조회 5,218
12년 전 조회 2,573
12년 전 조회 1,839
12년 전 조회 674
12년 전 조회 2,287
12년 전 조회 876
12년 전 조회 1,196
12년 전 조회 910
12년 전 조회 3,418
12년 전 조회 825
12년 전 조회 3,730
12년 전 조회 1,399
12년 전 조회 1,687
12년 전 조회 2,303
12년 전 조회 2,363
12년 전 조회 637
12년 전 조회 703
12년 전 조회 1,357
12년 전 조회 674
12년 전 조회 853
12년 전 조회 6,629
12년 전 조회 606
12년 전 조회 889
12년 전 조회 540
12년 전 조회 582
12년 전 조회 848
12년 전 조회 787
12년 전 조회 1,780
12년 전 조회 1,775
12년 전 조회 1,408
12년 전 조회 5,282
12년 전 조회 1,557
12년 전 조회 1,658
12년 전 조회 1,000
12년 전 조회 2,014
12년 전 조회 1,417
12년 전 조회 3,089
12년 전 조회 2,596
12년 전 조회 1,949
12년 전 조회 2,425
12년 전 조회 1,896
12년 전 조회 1,673
12년 전 조회 1,075
12년 전 조회 1,188
12년 전 조회 5,601
12년 전 조회 2,656
12년 전 조회 3,131
12년 전 조회 1,785
12년 전 조회 1,504
12년 전 조회 854
12년 전 조회 1,871
12년 전 조회 972
12년 전 조회 1,549
12년 전 조회 2,813
12년 전 조회 2,380
12년 전 조회 1,724
12년 전 조회 6,704
12년 전 조회 2,537
12년 전 조회 746
12년 전 조회 707
12년 전 조회 1,453
12년 전 조회 2,100
12년 전 조회 932
12년 전 조회 744
12년 전 조회 1,384
12년 전 조회 1,518
12년 전 조회 738
12년 전 조회 1,168
12년 전 조회 1,439
12년 전 조회 834
12년 전 조회 1,124
12년 전 조회 3,712
12년 전 조회 1,462
12년 전 조회 995
12년 전 조회 890
12년 전 조회 1,259
12년 전 조회 1,495
12년 전 조회 4,284
12년 전 조회 5,613
12년 전 조회 748
🐛 버그신고