--- community.php 2001/02/19 16:22:20 1.1 +++ community.php 2001/02/21 15:52:31 1.2 @@ -25,13 +25,13 @@ $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); -$sql_where=""; +$sql_where="where type='c'"; if (isset($id)) { - $sql_where="where id=$id"; + $sql_where.="and id=$id"; } -$sth = $dbh->prepare("select id,title,date,body,pic from community $sql_where order by id desc"); +$sth = $dbh->prepare("select id,title,date,body,pic from news $sql_where order by id desc"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $data[]=$row;