짧은 실력으로 직장다니며 작업하며 그누5로 옮기려니.. 벌써 한달이 넘어가고 있습니다.ㅠㅠ
그누4때 제가 올린 최신근입니다.
sql 어떻게 바꿔야 되는지.. 에러만나고 아무리 바꿔도 안되서요..
도움주시면 감사하겠습니다~^^
그룹내 최근글 있는 게시판순서대로 정렬되는 다중 최신글
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=108527
<table width="1050px" cellpadding=0 cellspacing="5" align="center">
</table>
$gr_id = "G";
$rows= "12"; // 출력수량
$total_count = "72";
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_10 desc limit $from_record, $rows";
$result = sql_query($sql);
$k=0;
echo "<tr valign='top'>";
for ($i=0; $row=sql_fetch_array($result); $i++) {
$k=$k+1;
echo "<td>";
echo latest('zw_gallery', $row[bo_table], 5, 28);
echo "</td>";
if($k==1) {echo "</tr><tr valign='top'>";
echo "<tr><td ><hr color='#222222' size='1' width='1050' align='center'> </td></tr>";
$k=0;}
}
echo "<tr><td width='100%' align='center'><span style='color:gray;'>";
$page = get_paging($total_page, $page, $total_page, "?gr_id=$gr_id&bo_table=$bo_table&page=");
echo "$page";
echo "</span></td></tr>";
?>
</table>
답변 2개 / 댓글 5개
올려주신 소스내에서는
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_10 desc limit $from_record, $rows";
$g4 를 $g5 로 바꾸는거 외에는 수정할 부분이 없네요.
아래 1050px 속성값이 잘못된거랑...
<table width="1050px" cellpadding=0 cellspacing="5" align="center">
답변에 대한 댓글 4개
select wr_content from g5_write_ where wr_id = '370'
보시듯 g5_write_ <- bo_table 값을 제대로 돌려받지 못했으니..
G 라는 그룹이 존재하는지, 그리고 G 라는 그룹내에 게시판이 존재하는지부터 먼저 확인하셔야죠..
bo_use_search 가 체크된 게시판이 존재하는지도..
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
select wr_content from g5_write_ where wr_id = '370'
1146 : Table 'indymaran.g5_write_' doesn't exist
error file : /gallery.php