h

주간 포인트순위 기간설정

주간 포인트순위라고 짜집기 하기 했는데 기간설정이 문제인지 몰라도 포인트가 이상하게 나오네요.
출력되는 포인트가 주간포인트인지 아님 얼마동안 포인트가 출력되는지 도통 알 수가 없네요.
잘못된 부분 수정 좀 부탁드리겠습니다.

------------------------------------------------------------------------------------------------

<table width="100%" bgcolor="#1e1e1e" cellpadding="0" cellspacing="2" border="0">
           <col width=30></col><col width=60></col><col width=180></col><col width=90></col><col width=100></col>
              <tr height="40" bgcolor="#1e1e1e"><td align="center" colspan="5" style="font-family:Malgun Gothic; font-size:13pt; color:#FFFFFF; font-weight:bold;"><?=$sYear?> <font color=tomato><?=$sMonth?></font> 주간 포인트 순위</td></tr>
              <tr height="30" bgcolor="#000000">
                  <td align="center" style="color:#eaeaea; font-size:9pt; font-family:Malgun Gothic; font-weight:bold;">순위</td>
                  <td align="center" style="color:#eaeaea; font-size:9pt; font-family:Malgun Gothic; font-weight:bold;">회원사진</td>
                  <td align="center" style="color:#eaeaea; font-size:9pt; font-family:Malgun Gothic; font-weight:bold;">닉네임</td>
                  <td align="center" style="color:#eaeaea; font-size:9pt; font-family:Malgun Gothic; font-weight:bold;">아이디</td>
                  <td align="center" style="color:#eaeaea; font-size:9pt; font-family:Malgun Gothic; font-weight:bold;">주간포인트</td>
              </tr>
              <?
                     $day = date("Y-m-d H:i:s", $g4['server_time'] - (7 * 86400));

                     $sql = " select mb_id, sum(po_point) as point from $g4[point_table] where po_point > '0' and po_datetime >= '$day' and mb_id != '$config[cf_admin]' group by mb_id order by point desc limit 0, 20 ";
                     $result = sql_query($sql);
                     for ($i=0; $data=sql_fetch_array($result); $i++) {

                         // 회원 데이터
                         $mb = get_member($data['mb_id']);

                         // 번호
                         $num = $i + 1;
              ?>
              
              <tr bgcolor="#101010" height="45">
                  <td align="center" style="font-family:tahoma; font-size:13px; color:#FFFFFF; font-weight:bold;"><b><?=$num?></b></td>
                  <td align="center">
                      <?
                         $photo_file = "$g4[path]/data/mPhoto_image/{$mb[mb_id]}";
                         $noimg = $g4[path]."$g4[path]/img/point_rank_none_img.gif";
                         $filter[type] = 99;
                         $filter[arg1] = 100;
                         $filter[arg2] = 1;
                         $filter[arg3] = 2;
                         $pic_file = thumbnail("$photo_file",42, 32, 0, 2, 100, 0, "",  $filter, $noimg);
                      ?>
                      <? if (file_exists($photo_file)) {?><img src="<?=$pic_file?>" border="0" style="border:#000000 1px solid; cursor:pointer;">
                      <? } else { ?>
                      <img src="./bbs/img/point_rank_none_img.gif" border="0" style="border:#000000 1px solid; cursor:pointer;">
                      <? } ?>
                  </td>
                  <td align="left" style="padding:0 5 0 5px; font-family:돋움; font-size:8pt;"><?= level_icon($mb[mb_id])?> <?= point_color($mb[mb_id])?></td>
                  <td align="left" style="padding:0 5 0 5px; font-family:tahoma; font-size:11px; color:#555555;"><b><?=$mb['mb_id']?></b></td>
                  <td align="right" style="padding:0 10 0 5px; font-family:tomato; font-size:14px; color:#FF1E00;"><b><?=number_format($data['point']);?></b> <b>p</b></td>
              </tr>
              <? } ?>
           </table>
|

댓글 3개

limit 0, 20 을 빼셔야 하지 않을까요?
현 시각, 초 단위로 7일 전부터 포인트 내역을 합산해서 보여 줍니다.

이번 주 월요일부터가 아니죠.
그러면 매주 월요일부터 일요일까지 포인트를 출력하려면 구문을 어떻게 수정해야 할까요?
답변 좀 부탁드릴께요.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
16년 전 조회 1,657
16년 전 조회 1,604
16년 전 조회 1,544
16년 전 조회 1,802
16년 전 조회 950
16년 전 조회 1,026
16년 전 조회 895
16년 전 조회 1,056
16년 전 조회 986
16년 전 조회 1,549
16년 전 조회 963
16년 전 조회 966
16년 전 조회 1,732
16년 전 조회 1,536
16년 전 조회 1,077
16년 전 조회 1,490
16년 전 조회 1,684
16년 전 조회 891
16년 전 조회 1,528
16년 전 조회 955