새로운 Lib파일을 만들어서
function latest_all($skin_dir='', $subject='', $rows=10, $subject_len=40, $sub_table='', $cache_time=1, $options='')
이렇게 사용하고 있습니다.
$option 뒤에 항목을 하나 더 만들고 싶은데, $test='' 라는걸 하나 넣고
$sql .= "{$sql_union}) X where {$options} wr_is_comment = 0 order by wr_datetime desc limit 0, {$rows}";
이 부분에서
$sql .= "{$sql_union}) X where {$options} wr_is_comment = 0 {$test} order by wr_datetime desc limit 0, {$rows}";
$test를 추가하면 되는건가요?
출력은
<?php echo latest_all('basic', '전체게시판', 10, 30 ,array('notice','free'),"and wr_2='1'"); ?>
이렇게 여분필드2에 체크됐을때만 나오게 하는건데..
동작을 안하네요
and wr_2='1'을 lib파일에서 $test자리에 직접 넣으면 동작하긴 합니다.
저것때문에 파일을 두개로 분리하는것보다 다른 방법이 있을것같아 질문드려요
|
답변 1개
채택된 답변
+20 포인트
블랙캣77
2021-05-12 (수) 23:17:32
지금 하신데로면 6번째니 $cache_time에 들어갈거 같네요 test가 아니라
답변을 작성하려면 로그인이 필요합니다.