자신이 추천한 글의 작성자가 쓴 모든글을 추출할수 있을까요..? 채택완료
현재 비추천 기능은 사용중이지 않고.
board_good 테이블을 통해서 자신이 추천을 누른 글의 작성자가 쓴 모든 글을 최신글 식으로
추출하고자해요..
</p><p> if(!G5_USE_CACHE || $cache_fwrite) {</p><p> $list = array();</p><p> </p><p> $sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";</p><p> $board = sql_fetch($sql);</p><p> $bo_subject = get_text($board['bo_subject']);</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$member = get_text($mb['mb_id']);</p><p> </p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$tmp_write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름</p><p> $sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";</p><p> $result = sql_query($sql);</p><p> for ($i=0; $row = sql_fetch_array($result); $i++) {</p><p> $list[$i] = get_list($row, $board, $latest_skin_url, $subject_len);</p><p> }</p><p> </p><p> if($cache_fwrite) {</p><p> $handle = fopen($cache_file, 'w');</p><p> $cache_content = "<?php\nif (!defined('_GNUBOARD_')) exit;\n\$bo_subject='".$bo_subject."';\n\$list=".var_export($list, true)."?>";</p><p> fwrite($handle, $cache_content);</p><p> fclose($handle);</p><p> }</p><p> }</p><p> </p><p> ob_start();</p><p> include $latest_skin_path.'/latest.skin.php';</p><p> $content = ob_get_contents();</p><p> ob_end_clean();</p><p> </p><p> return $content;</p><p>}</p><p>?></p><p>
위에는 따로 최신글 php를 새로 만든것이구
$sql = " select wr_id, mb_id from g5_board_good_table where mb_id = '$member[mb_id]' ";
$row = sql_fetch($sql);
g5_board_good_table 의 wr_id 와 $tmp_write_table 의 wr_id를 일치시키면 될것같은데.. 잘모르겠네요 ㅠㅠ
도저히 감이 안잡히네요..ㅠㅠ 도움부탁드릴게요..
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
port443
9년 전
우선 그누보드를 안쓰는 입장에서 말로 풀어써봅니다.
1. board_good 에서 자신이 추천을 누른 글의 리스트에 select 정보로 해당 글의 글쓴이를 가져옵니다.
2. board_good 에서 가져온 글쓴이들을 where in 조건으로 검색합니다. order by 조건은 최신순 DESC 로 합니다.
이런식으로 풀어가면 되지 않을까요?
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
채택
답변대기
답변대기
답변대기
답변대기
채택
채택
답변대기
답변대기
답변대기
채택