게시판 정렬 순서 정보
게시판 정렬 순서관련링크
본문
<? // 그룹 이름 출력
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '$gr_id'";
$result = mysql_query($sql);
while ($row=mysql_fetch_array($result)) { echo "<table bgcolor=#EAF6FF width=160><tr><td align=center><b><a href='$g4[sub_path]/gr_$gr_id.php'>$row[gr_subject]</a></td></tr>"; }
?>
<? // 메뉴 자동생성
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' order by bo_order_search";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<tr><td><a href='$g4[path]/bbs/board.php?bo_table=$row[bo_table]'>$row[bo_subject]</a></td></tr>";
}
?>
</table>
------------------ 이렇게 했는데
게시판이 id 순으로 나오지 않고
게시판 생성 순으로 나옵니다.
게시판 id 순으로 나오게 하려면 어디를 고쳐야 하나요?
* 링크 참조
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '$gr_id'";
$result = mysql_query($sql);
while ($row=mysql_fetch_array($result)) { echo "<table bgcolor=#EAF6FF width=160><tr><td align=center><b><a href='$g4[sub_path]/gr_$gr_id.php'>$row[gr_subject]</a></td></tr>"; }
?>
<? // 메뉴 자동생성
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' order by bo_order_search";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
echo "<tr><td><a href='$g4[path]/bbs/board.php?bo_table=$row[bo_table]'>$row[bo_subject]</a></td></tr>";
}
?>
</table>
------------------ 이렇게 했는데
게시판이 id 순으로 나오지 않고
게시판 생성 순으로 나옵니다.
게시판 id 순으로 나오게 하려면 어디를 고쳐야 하나요?
* 링크 참조
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339