im trying to write a script that will archive my news by month. I'm not sure how to go about it, but this (what im about to paste) obviously didnt work. If someone could conceptualize how im supposed to do it, that would be really helpful.
$result2 = mysql_query ("SELECT Newsdate FROM news");
if($result2 == "2003-01-01 00:00:00" - "2003-01-31 99:99:99") {
echo"<br>";
$month = "January";
echo"<b>";
echo($month);
echo"</b>";
echo"<br>";
while($row=mysql_fetch_array($result)) {
$list = '<a href="newsget2.php?id='.$row['ID'].'" target="mainFrame">'.$row["Subject"].'</a>';
echo($list);
echo" ";
echo("<font size=1>".$row["Newsdate"]."</font>");
echo"<br>";
I figured i would just make 12 if statements (for each month).
I hope everyone can understand what im trying to do. thanks, later.