채택완료

랜덤 출력 질문드립니다.

2022-01-19 (수) 15:54:15 1,768

아래코드로 메인에 게시판을 불러오고 있습니다.

랜덤으로 출력할 수 있는 방법 있을까요?

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 포인트

랜덤은 해당 소스에는 확인이 불가하고 여기서는 구분값을 넣어 board.php파일에서 리스트 쿼리에

order by rand() 주어야 랜덤으로 가져옵니다.

답변을 작성하려면 로그인이 필요합니다.