$q = "SELECT id, headline, entry, date_format(date,'%M %d, %Y') as r_date FROM news ORDER BY id DESC";
$r = mysql_query($q);
$num_r = mysql_num_rows($r);
for ($x=0; $x<$num_r; $x++) {
$row = mysql_fetch_array($r);
echo "
".$row['headline']."\n";
echo wordlimit(stripslashes(nl2br($row['entry'])), 50)."
\n";
echo "
".$row['r_date']."\n";
echo "
";
}
?>
$q = "SELECT * FROM work WHERE spot='Yes' GROUP BY RAND() LIMIT 1";
$r = mysql_query($q);
$num_r = mysql_num_rows($r);
for ($x=0; $x<$num_r; $x++) {
$row = mysql_fetch_array($r);
echo "