Nbuilder PHP Q&A
이부분에서 한달째..
※ 필수입력정보 ※
▷ 제품버젼 :
▷ 사용중인 주소(URL) : http://
▷ 문제발생시 메뉴/주소 :
▷ 문제발생시 에러메세지
:
▷ 질문내용
:
머리아프고 진납니다..
한수 가르쳐 주십시오..
$CLUB_ROOT/home/board_list.php 이분에서
<?
// select - board_admin
// => leftmenu.php
// select - board
$board_list = array();
$board = array();
for ($i=0; $i<sizeof($db_table_n); $i++)
{
$SQL = "SELECT b_bno, b_title, b_writedate FROM `" . $db_board_id_n[$i] . "` ORDER BY b_bno DESC LIMIT 1";
//echo $SQL;
$db->ParseExec($SQL);
$db->fetchInto(&$board);
$db->parseFree();
if ($board[b_bno] != NULL)
{
$board_list[table][] = $db_table_n[$i];
$board_list[title][] = $db_title_n[$i];
//$board_list[b_bno][] = $board[b_bno];
$board_list[b_title][] = $board[b_title];
$board_list[b_writedate][] = $board[b_writedate];
} // if()
} // for()
for ($i=0; $i<sizeof($db_table_f); $i++)
{
$SQL = "SELECT b_bno, b_title, b_writedate FROM `" . $db_board_id_f[$i] . "` ORDER BY b_bno DESC LIMIT 1";
//echo $SQL;
$db->ParseExec($SQL);
$db->fetchInto(&$board);
$db->parseFree();
if ($board[b_bno] != NULL)
{
$board_list[table][] = $db_table_f[$i];
$board_list[title][] = $db_title_f[$i];
//$board_list[b_bno][] = $board[b_bno];
$board_list[b_title][] = $board[b_title];
$board_list[b_writedate][] = $board[b_writedate];
} // if()
} // for()
for ($i=0; $i<sizeof($db_table_i); $i++)
{
$SQL = "SELECT b_bno, b_title, b_writedate FROM `" . $db_board_id_i[$i] . "` ORDER BY b_bno DESC LIMIT 1";
//echo $SQL;
$db->ParseExec($SQL);
$db->fetchInto(&$board);
$db->parseFree();
if ($board[b_bno] != NULL)
{
$board_list[table][] = $db_table_i[$i];
$board_list[title][] = $db_title_i[$i];
//$board_list[b_bno][] = $board[b_bno];
$board_list[b_title][] = $board[b_title];
$board_list[b_writedate][] = $board[b_writedate];
} // if()
} // for()
$board_cnt = is_array($board_list[table]) ? sizeof($board_list[table]) : 0;
?> <BODY leftMargin=0 topMargin=0 ><img src="<?= $CLUB_IMG_ROOT ?>/title_board.gif" border="0" alt="" width="124" height="22">
<TABLE width="100%" border="0" cellpadding="7" cellspacing="0">
<tr>
<td colspan="2" height="5"></td>
</tr>
<tr>
<td colspan="2" height="1" background="<?= $CLUB_IMG_ROOT ?>/line1.gif"></td>
</tr>
<?
for ($i=0; $i<$board_cnt; $i++)
{
?>
<TR onmouseover="this.style.background='#efefef'" onmouseout="style.background='#fafafa'" bgcolor="fafafa">
<TD width="612"> <img src="<?= $CLUB_IMG_ROOT ?>/icon_green.gif" width="11" height="9" border="0" alt=""><a href="<?= $URL_ROOT ?>/community/module/board/boardList.php?<?= $board_list[table][$i] ?>&cl_id=<?= $cl_id?>">[
<?= $board_list[title][$i] ?>
]
<?= $board_list[b_title][$i] ?>
</a></TD>
<TD width="507" align="center">
<?= substr($board_list[b_writedate][$i], 0, 10) ?>
</TD>
</TR>
<tr>
<td colspan="2" height="1" background="<?= $CLUB_IMG_ROOT ?>/line1.gif"></td>
</tr>
<?
} // for()
?>
<?
if ($board_cnt < 1)
{ ?>
<TR onmouseover="this.style.background='#efefef'" onmouseout="style.background='#fafafa'" bgcolor="fafafa">
<TD colspan="2" align="center"> <img src="<?= $CLUB_IMG_ROOT ?>/icon_green.gif" width="11" height="9" border="0" alt=""> 등록된 게시물이 존재하지 않습니다.</TD>
</TR>
<?
}
?>
</TABLE>
<p><br>
<br>
에서 왜 $SQL = "SELECT b_bno, b_title, b_writedate FROM `" . $db_board_id_n[$i] . "` ORDER BY b_bno DESC LIMIT 1";
이것을 $SQL = "SELECT b_bno, b_title, b_writedate FROM `" . $db_board_id_n[$i] . "` ORDER BY b_bno DESC LIMIT 0,5"; 했는데 왜 최근게시물 5개가 안나오죠??
나오게 할수 있는 방법없나요
이전 글 | 동호회 관련해서 궁금한 점이 있는데요 1 | ^* | 2004.03.23 |
---|---|---|---|
다음 글 | 로그인관련입니다. 1 | 궁*이 | 2004.03.22 |