채택완료

 echo latest("theme/pic_basic3","free2", 2, 28,1 ,"wr_2 = 1"); 

2018-09-04 (화) 09:23:58 2,520

 echo latest("theme/pic_basic3","free2", 2, 28,1 ,"wr_2 = 1");  값을 넣으니 실행이 안되네요..

wr_2 = 1 이값이 실행이 됙 하려면 어떻게 해야할까요?

|

답변 1개

채택된 답변
+20 포인트

인자를 추가하려면 latest 함수를 수정해야 합니다만 기본 latest 함수는

function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='')

6번째 인자가 option 변수로 할당되어 있으니

쿼리에 적용하려면 lib/latest.lib.php 파일 67라인

        $sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";

를

        $sql = " select * from {$tmp_write_table} where wr_is_comment = 0  {$option} order by wr_num limit 0, {$rows} ";

이렇게 해보세요.

echo latest("theme/pic_basic3","free2", 2, 28,1 ,"wr_2 = 1");

는

echo latest("theme/pic_basic3","free2", 2, 28,1 ," and wr_2 = 1");

로 해보세요

답변을 작성하려면 로그인이 필요합니다.