개인별 그룹 아이디 호출 정보
개인별 그룹 아이디 호출본문
개인별 그룹 아이디 호출하는 법을 알려주세요
제가 원하는 것은 이 소스에서 개인이 속한 게시판 그룹을 검색해서 index.php에
해당된 게시판만 보여주고 싶습니다.
아래는 index소스입니다. 도와 주세요 ㅜㅜ
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
제가 원하는 것은 이 소스에서 개인이 속한 게시판 그룹을 검색해서 index.php에
해당된 게시판만 보여주고 싶습니다.
아래는 index소스입니다. 도와 주세요 ㅜㅜ
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
댓글 전체
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
==>
$sql= " select B.bo_table, B.bo_subject from g4_board B inner join g4_group G on B.gr_id=G.gr_id inner join g4_group_member M on G.gr_id=M.gr_id where
-> M.mb_id='{$member['mb_id']}' "
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
==>
$sql= " select B.bo_table, B.bo_subject from g4_board B inner join g4_group G on B.gr_id=G.gr_id inner join g4_group_member M on G.gr_id=M.gr_id where
-> M.mb_id='{$member['mb_id']}' "