[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' '";
게시글 목록
| 번호 | 제목 |
|---|---|
| 23606 | |
| 23598 | |
| 23585 | |
| 23579 | |
| 23578 | |
| 23564 | |
| 23550 | |
| 23549 | |
| 23548 | |
| 23529 | |
| 23510 | |
| 23507 | |
| 23481 | |
| 23471 | |
| 23453 | |
| 23452 | |
| 23450 | |
| 23436 | |
| 23428 | |
| 23404 | |
| 23396 | |
| 23389 | |
| 23380 | |
| 23369 | |
| 23350 | |
| 23337 | |
| 23317 | |
| 23307 | |
| 23298 | |
| 23290 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기