|
|
|
|
|
= $todayTimestamp ORDER BY articledate DESC LIMIT 0,12");
} else {
$query = mysql_query("SELECT * from newsarticles WHERE startdate <= $todayTimestamp AND stopdate >= $todayTimestamp AND articletype='$type' ORDER BY articledate DESC LIMIT 0,12");
}
} elseif($archiveMode == "yes") {
if($type == "all") {
$query = mysql_query("SELECT * from newsarticles WHERE stopdate <= $todayTimestamp ORDER BY articledate DESC LIMIT 0,12");
} else {
$query = mysql_query("SELECT * from newsarticles WHERE stopdate <= $todayTimestamp AND articletype='$type' ORDER BY articledate DESC LIMIT 0,12");
}
}
}
if(!$articleid) {
// Display appropriate articles with a while loop
while($result = mysql_fetch_array($query)) {
// Output articles
$newDate = date("m-d-Y", $result[articledate]);
echo "\n";
//echo "$result[article] \n";
}
} else {
$query = mysql_query("SELECT * from newsarticles WHERE articleID='$articleID'");
while($result = mysql_fetch_array($query)) {
// Convert timestamps to actual dates
$newArticleDate = date("M d, Y",$result[articledate]);
// Output articles
echo "$result[title] \n";
echo "$result[article]\n";
}
}
?>
>>> More news |