포인트 순위 질문좀 할께요 초보라서 ㅜㅜ 정보
포인트 순위 질문좀 할께요 초보라서 ㅜㅜ본문
현재 포인트 랭킹 순위를 사용하고있는데요.
echo "<td><img src={$g4[path]}/pdca/rank_$i.gif width=12 height=11 align=absmiddle>$name";
이부분을 보니까 순위 이미지를 불러오게 되어있더라구요.
순위 이미지 말고 랭킹에 오른 아이디의 포인트 계급이 보이게 하려면 어떻게 해야할까요? ㅜㅜ
답변 부탁 좀 드리겠습니다 ㅜㅜ
<?
include_once("./_common.php");
$g4[title] = "포인트 순위";
include_once("$g4[path]/head.sub.php");
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td valign=top colspan=2 class=lh>
<?
echo "</td></tr><tr><td valign=top width=50%>";
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 3;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 5;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($i && $i%$mod==0)
echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
echo "<table width=175px height=26 cellpadding=0 align=center class=box border=0><tr>";
echo "<td><img src={$g4[path]}/pdca/rank_$i.gif width=12 height=11 align=absmiddle>$name";
echo "</td>";
echo "<td align=right><font style=font-size:8pt; bg7>{$point}점</font></td>";
echo "</tr></table>";
}
?></td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
echo "<td><img src={$g4[path]}/pdca/rank_$i.gif width=12 height=11 align=absmiddle>$name";
이부분을 보니까 순위 이미지를 불러오게 되어있더라구요.
순위 이미지 말고 랭킹에 오른 아이디의 포인트 계급이 보이게 하려면 어떻게 해야할까요? ㅜㅜ
답변 부탁 좀 드리겠습니다 ㅜㅜ
<?
include_once("./_common.php");
$g4[title] = "포인트 순위";
include_once("$g4[path]/head.sub.php");
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td valign=top colspan=2 class=lh>
<?
echo "</td></tr><tr><td valign=top width=50%>";
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 3;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 5;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($i && $i%$mod==0)
echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
echo "<table width=175px height=26 cellpadding=0 align=center class=box border=0><tr>";
echo "<td><img src={$g4[path]}/pdca/rank_$i.gif width=12 height=11 align=absmiddle>$name";
echo "</td>";
echo "<td align=right><font style=font-size:8pt; bg7>{$point}점</font></td>";
echo "</tr></table>";
}
?></td>
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
?>
( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '282337' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )
1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
error file : /15sir/bbs/board.php