[code]
$Search = " where (1) ";
$Search .= " and wr_is_comment = 0 and wr_datetime >= (NOW() - INTERVAL 7 DAY) ";
$SelectBoard = " select bo_table from ".$g5['board_table'];
$QueryBoard = sql_query($SelectBoard);
while($RowBoard = sql_fetch_array($QueryBoard)){ $ResultSelect[] = "( select *, '".$RowBoard['bo_table']."' as bo_table from ".$g5['write_prefix'].$RowBoard['bo_table'].$Search." )"; }
$ResultQuery = implode(" union all ", $ResultSelect);
$ResultQuery .= " order by rand() limit 10 ";
$Query = sql_query($ResultQuery);
while($Row = sql_fetch_array($Query)){
$Rand = rand(1, 50);
sql_query(" update ".$g5['write_prefix'].$Row['bo_table']." set wr_hit = wr_hit+".$Rand." where wr_id = ".$Row['wr_id']." ");
}
[/code]
모든 게시판에 적용 됩니다.
$Rand = rand(1, 50); // 1부터 50까지 랜덤으로 올라갑니다.
댓글 8개
특정 게시판을 제외 하시고 싶으시면
$SelectBoard = " select bo_table from ".$g5['board_table'];
이부분을
$SelectBoard = " select bo_table from ".$g5['board_table']." where (1) and bo_table != 'test' '"; // test는 게시판 테이블명 이 아닌 것만 추출 하게 됩니다.!
만약 test1, test2 게시판을 제외 하시고 싶다면
$SelectBoard = " select bo_table from ".$g5['board_table']." where (1) and bo_table != 'test1' and bo_table != 'test2' '";
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기