테스트 사이트 - 개발 중인 베타 버전입니다

비회원은 랭킹에 안나오게

· 12년 전 · 789 · 2
gamereporters_com_20130401_204955.jpg
function rank_member($type,$skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;

$array_type = array("아이디"=>"mb_id","이름"=>"wr_name");

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select *,count(wr_id) as cnt from $tmp_write_table where wr_is_comment = 0 group by ".$array_type[$type]." order by count(wr_id) desc limit 0, $rows ";

//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();

return $content;
}


펑션을 이용해서 랭킹을 불러오는데요 비회원도 자꾸 출력되서 골치아픕니다

비회원은 출력시키지 않으려면 어떻게 해야하나요?

답변부탁드립니다.(_ _)

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

12년 전
$sql = " select *,count(wr_id) as cnt from $tmp_write_table where mb_id<>'' and wr_is_comment = 0 group by ".$array_type[$type]." order by count(wr_id) desc limit 0, $rows ";
스위치님 감사드려요^^

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440