게시판 리스트에서..
분류별로 묶어서 보여주고싶습니다.
팁좀 부탁드립니다.
분류명-A
-- 해당분류 게시물
-- 해당분류 게시물
분류명-B
-- 해당분류 게시물
-- 해당분류 게시물
이렇게요.!~~
분류별로 묶어서 보여주고싶습니다.
팁좀 부탁드립니다.
분류명-A
-- 해당분류 게시물
-- 해당분류 게시물
분류명-B
-- 해당분류 게시물
-- 해당분류 게시물
이렇게요.!~~
댓글 1개
1. latest.skin.php 만들기 - 출력할 형태 잡기
2. lib/latest.lib.php 에 latest() 함수를 복사하여 latest_ca()함수 추가
function latest_ca($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options=""){
..
..
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name='$options' order by wr_num limit 0, $rows ";
...
}
3. latest_ca() 호출
<?=latest_ca("1번 스킨명:,:테이블명",10,40,"분류명-A");?>
<?=latest_ca("1번 스킨명:,:테이블명",10,40,"분류명-B");?>
2. lib/latest.lib.php 에 latest() 함수를 복사하여 latest_ca()함수 추가
function latest_ca($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options=""){
..
..
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name='$options' order by wr_num limit 0, $rows ";
...
}
3. latest_ca() 호출
<?=latest_ca("1번 스킨명:,:테이블명",10,40,"분류명-A");?>
<?=latest_ca("1번 스킨명:,:테이블명",10,40,"분류명-B");?>
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기