오빠야

root 님 감사합니다.

요것이었군요...
뒤에 실장님이 워낙에 이것저것 원하시는 것이 중복 되다 보니 차분하게 살펴 보지를 못하였는데 root 님의 말씀에 확~~~ 번개같이 뇌리를 때리는군요... ^@@^

// 최신글 추출2
function latest2($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="wr_type5")
{
global $g4;

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where( wr_is_comment = 0 and wr_type5 > 0 ) order by wr_type5 limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();

return $content;
}
|

댓글 3개

루트님..
운둔 고수님 ㄷ ㄷ ㄷ
2003년부터 뵈었던 것 같은..
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
12년 전 조회 972
12년 전 조회 2,046
12년 전 조회 1,099
12년 전 조회 1,109
12년 전 조회 1,111
12년 전 조회 1,468
12년 전 조회 1,405
12년 전 조회 2,671
12년 전 조회 1,101
12년 전 조회 3,376
12년 전 조회 1,814
12년 전 조회 1,124
12년 전 조회 1,222
12년 전 조회 1.4만
12년 전 조회 1,149
12년 전 조회 1,382
12년 전 조회 1,114
12년 전 조회 1,436
12년 전 조회 1,248
12년 전 조회 1,386
12년 전 조회 1,635
12년 전 조회 1,290
12년 전 조회 1,197
12년 전 조회 1,141
12년 전 조회 3,999
12년 전 조회 1,196
12년 전 조회 3,606
12년 전 조회 1,136
12년 전 조회 1,117
12년 전 조회 1,807
🐛 버그신고