다중 카테고리값을 ca_name에 담아서 가|나|다 일때 라테스트에서 추출어떻게 할까욤?
다중 카테고리값을 ca_name에 담아서 가|나|다 일때 라테스트에서 추출어떻게 할까욤?
latest.lib.php >> 에서요 $options' 값을 받아왔습니다~~
옵션값은 '가' 하나이지만 이게시판에 ca_name 값은 가|나|다 이러헥 있습니다~
여기서 가|나|다 값에 옵션값이 있는지 비교하여 있으면 latest로 보여주기 하면되는데요~~
고수님들 도와주세욤^^;; 그럼 대박나시길 바라겠습니다~
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name='$options' order by wr_last desc 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;
latest.lib.php >> 에서요 $options' 값을 받아왔습니다~~
옵션값은 '가' 하나이지만 이게시판에 ca_name 값은 가|나|다 이러헥 있습니다~
여기서 가|나|다 값에 옵션값이 있는지 비교하여 있으면 latest로 보여주기 하면되는데요~~
고수님들 도와주세욤^^;; 그럼 대박나시길 바라겠습니다~
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name='$options' order by wr_last desc 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;
댓글 2개
Jos87
13년 전
무슨 질문인지 이해가 안되요 ㅠ
최신글 추출할때 게시물당 카테고리는 list[$i]['ca_name']에 있습니다.
최신글 추출할때 게시물당 카테고리는 list[$i]['ca_name']에 있습니다.
sir24
13년 전
list[$i]['ca_name'] 그값이 하나가 아니라 가|나|다 여러개 들어가있을때요~~
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기