아래코드로 메인에 게시판을 불러오고 있습니다.
랜덤으로 출력할 수 있는 방법 있을까요?
Copy
<?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개
채택된 답변
+20 포인트
2022-01-19 (수) 16:09:36
랜덤은 해당 소스에는 확인이 불가하고 여기서는 구분값을 넣어 board.php파일에서 리스트 쿼리에
order by rand() 주어야 랜덤으로 가져옵니다.
2022-01-19 (수) 16:51:39
최신글(lastest() 함수)를 고려 해 보세요.
답변을 작성하려면 로그인이 필요합니다.