![](images/header1.gif) |
![](images/header2c.gif) |
include('navbar.php'); ?>
|
![](images/header3.gif) |
![](images/edge_body_left.gif) |
include('includes/dbconn.php'); ?>
![](images/heading_latestnews.gif)
Please select one of Bulletins below for more information... |
![](images/bulletins_pin.gif) |
$sql1 = "SELECT * FROM categories ORDER BY category_name ASC";
$sqlresult1 = mysql_query($sql1);
while($record1 = mysql_fetch_array($sqlresult1, MYSQL_ASSOC))
{
$category_id=(int)$record1['id'];
$category_name=$record1['category_name'];
?>
$sql = "select * from bulletins WHERE bulletin_category_id=$category_id ORDER BY bulletin_date DESC";
$sqlresult = mysql_query($sql);
$rowcount=1;
while($record = mysql_fetch_array($sqlresult, MYSQL_ASSOC))
{
?>
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
$bulletin_date = date("Y-m-d",$record['bulletin_date']);
echo $bulletin_date;
?>
|
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
echo $record['bulletin_headline']; ?> |
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
view complete bulletin |
$rowcount=$rowcount + 1;
}
}
?>
// The list above only does bulletins that have category ids associated with them. Now we need to list all bulletins that do not have an associated category
$sql2 = "SELECT * FROM bulletins WHERE bulletin_category_id IS NULL ORDER BY bulletin_date DESC";
$sqlresult2 = mysql_query($sql2);
while($record2 = mysql_fetch_array($sqlresult2, MYSQL_ASSOC))
{
?>
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
$bulletin_date = date("Y-m-d",$record2['bulletin_date']);
echo $bulletin_date;
?>
|
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
echo $record2['bulletin_headline']; ?> |
if ($rowcount%2==0) {
?>
} else {
?> |
} ?>
view complete bulletin |
$rowcount=$rowcount + 1;
}
?>
mysql_close(); ?>
|
|
|
![](images/edge_body_right.gif) |
|