/*存放帖子の表结构 CREATE TABLE cancel ( announce_id int(11) NOT NULL auto_increment, board_id smallint(6) NOT NULL, title varchar(100) NOT NULL, content tinytext, add_time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, auth_name varchar(20) NOT NULL, auth_mail varchar(40), hit_count smallint(6) NOT NULL, bytes Mediumint(9) NOT NULL, parent_id tinyint(4) NOT NULL, auth_ip varchar(15) NOT NULL, top_id int(11) NOT NULL, return_count tinyint(4) NOT NULL, face char(3) NOT NULL, 主キー(announce_id), KEY board_id (board_id), KEY top_id (top_id) ); */
function show_announce($id,$self_id){ global $dbconnect; global $board_id; $query=" select * from cancel where Anan_id='$id'"; $result=mysql_query($query,$dbconnect); $myrow=mysql_fetch_array($result); mysql_free_result($result); echo "
n"; echo " "; if($self_id !=$id) echo ""; echo $myrow[title]; if ($self_id!=$id) echo ""; echo " - 【".$myrow[auth_name]."] ".$myrow[add_time]。" [id:$myrow][announce_id] 点击:$myrow[hit_count]] ($myrow[bytes] バイト) ($myrow[return_count])n"; $query="select cancel_id from Notice whereparent_id='$id' order by cancel_id desc "; $ result = mysql_query($ query、$ dbconnect); echo"< ul> n "; ; } echo "n"; mysql_free_result($result); echo "
//この項目には接続データ库 が必要です//必要に応じて分割を追加できます $query="select cancel_id from cancel where top_id='0' order by cancel_id desc "; $result_top =mysql_query($query,$dbconnect); echo "