

NEWSROOM ARCHIVE
//determine which database we want to use $db = mysql_select_db("museum_website"); //Querying the DB for all the news stories ordered by postDate //This will make the most recent news stories show up first. $newsQuery = "SELECT newsID, newsTitle, monthName(newsDate) as newsMonthName, dayofmonth(newsDate) as newsDay, year(newsDate) as newsYear, newsLead from news order by postDate desc, newsID desc"; $newsResult = mysql_query($newsQuery); $num_news = mysql_num_rows($newsResult); if ($num_news == 0) { echo "There are no news items in our system at this time.
"; } else { echo "";
echo "
";
}
?>
- ";
for ($i=0; $i<$num_news; $i++)
{
$row = mysql_fetch_array($newsResult);
echo "
- ".(stripslashes($row['newsTitle'])).", ".(stripslashes($row['newsLead']))."(".(stripslashes($row['newsMonthName']))." ".(stripslashes($row['newsDay'])).", ".(stripslashes($row['newsYear'])).")"; echo " "; } echo "
Return to the Newsroom.