|
|
 |


//List Upcoming Event Headlines
$count = 1;
$dbLink = mysql_connect("$db_server", "$db_user", "$db_password");
mysql_select_db("$db_name", $dbLink);
$Query = "SELECT date, headline " .
"FROM tb_calendar " .
"WHERE date >= NOW() ORDER BY date";
$dbResult = mysql_query($Query, $dbLink);
while($row = mysql_fetch_row($dbResult))
{
if($count <= 5)
{
$date = $row[0];
$thisheadline = $row[1];
?> print($date." ".$thisheadline); ?>

}
$count = $count + 1;
}
?>
|  |
 |


//List Current News Headlines
$count = 1;
$dbLink = mysql_connect("$db_server", "$db_user", "$db_password");
mysql_select_db("$db_name", $dbLink);
$Query = "SELECT newsid, headline " .
"FROM tb_news " .
"WHERE removedate >= NOW() AND postdate <= NOW() " .
"ORDER BY postdate DESC";
$dbResult = mysql_query($Query, $dbLink);
while($row = mysql_fetch_row($dbResult))
{
if($count <= 5)
{
$id = $row[0];
$thisheadline = $row[1];
?> print($thisheadline); ?>

}
$count = $count + 1;
}
?>
|  |
|
|