테스트 사이트 - 개발 중인 베타 버전입니다

rss 질문입니다. 고수님들~~ 채택완료

현재 bbs/rss.php 내용은이런데요?  

// 특수문자 변환 function specialchars_replace($str, $len=0) {     if ($len) {         $str = substr($str, 0, $len);     }

    $str = str_replace(array("&", "<", ">"), array("&", "<", ">"), $str);

    /*     $str = preg_replace("/&/", "&", $str);     $str = preg_replace("//", ">", $str);     */

    return $str; }

$sql = " select gr_id, bo_subject, bo_page_rows, bo_read_level, bo_use_rss_view from {$g5['board_table']} where bo_table = '$bo_table' "; $row = sql_fetch($sql); $subj2 = specialchars_replace($row['bo_subject'], 255); $lines = $row['bo_page_rows'];

// 비회원 읽기가 가능한 게시판만 RSS 지원 if ($row['bo_read_level'] >= 2) {     echo '비회원 읽기가 가능한 게시판만 RSS 지원합니다.';     exit; }

// RSS 사용 체크 if (!$row['bo_use_rss_view']) {     echo 'RSS 보기가 금지되어 있습니다.';     exit; }

header('Content-type: text/xml'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache');

$sql = " select gr_subject from {$g5['group_table']} where gr_id = '{$row['gr_id']}' "; $row = sql_fetch($sql); $subj1 = specialchars_replace($row['gr_subject'], 255);

echo ''."\n"; ?> " target="_blank" rel="noopener noreferrer">http://purl.org/dc/elements/1.1/"> <?php echo specialchars_replace($config['cf_title'].' > '.$subj1.' > '.$subj2); ?> ko

    if (strstr($row['wr_option'], 'html'))         $html = 1;     else         $html = 0;

if ($i === 0) {     echo ''. specialchars_replace($subj2). ' ('. $row['wr_datetime'] .')'.PHP_EOL; } ?>

<?php echo specialchars_replace($row['wr_subject']); ?> ]]>

echo ''."\n"; echo ''."\n"; 이 rss 는 게시판별로 최근글을 뽑아오는 rss 인것 같습니다.

하지만 특정게시판의 특정 아이디를 검색한 결과에 대한 rss 를 생성하고 싶습니다.

 

그래서  $sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option             from {$g5['write_prefix']}$bo_table             where mb_id='아이디' and wr_is_comment = 0             and wr_option not like '%secret%'             order by wr_num, wr_reply limit 0, $lines "; 요부분의 where 조건에 아이디면 mb_id 닉네임이면 wr_name 의 조건을 걸어 검색을 해보려고했는데 조건에 맞는 결과가 rss 로 보여지지 않습니다 ㅠㅠ 어느부분의 조건을 넣어야 rss 가 조건에 맞는 결과를 생성할 수가 있을까요? 고수님들의 좋은 조언 부탁드립니다 

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

답변 1개

채택된 답변
+20 포인트

스페이스가 누락된것 같습니다.

</p>

<p>where mb_id='아이디' andwr_is_comment = 0</p>

<p>where mb_id='아이디' and wr_is_comment = 0</p>

<p>

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

그걸못봤네요 감사합니다 ^^

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

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

로그인

전체 질문 목록

🐛 버그신고