랜덤 출력 질문드립니다.
본문
아래코드로 메인에 게시판을 불러오고 있습니다.
랜덤으로 출력할 수 있는 방법 있을까요?
<?php
$bo_table="brandmember";
$write_table="g5_write_". $bo_table;
$board=sql_fetch("select * from {$g5['board_table']} where bo_table='{$bo_table}'");
$board_skin_path=get_skin_path('board', $board['bo_skin']);
$board_skin_url=get_skin_url('board', $board['bo_skin']);
include_once(G5_BBS_PATH .'/board.php');
?>
답변 2
랜덤은 해당 소스에는 확인이 불가하고 여기서는 구분값을 넣어 board.php파일에서 리스트 쿼리에
order by rand() 주어야 랜덤으로 가져옵니다.
최신글(lastest() 함수)를 고려 해 보세요.
답변을 작성하시기 전에 로그인 해주세요.