im trying to make a php script where it will sort the data based on what date is it.
it's for album release dates.
for example. if the release date of the album is before today, the album will be displayed in the 'new releases' section. if the release date is AFTER today and the album is not yet available. i want it to go in the 'upcoming releases' section.
i'm fairly new to php and mysql, but i can get around a little bit.
if anyone can help i would really appreciate it. thank you
i've attached an example of my current code for you to check out
$result = mysql_query("SELECT cover100,band,title,band_id,id,rls_date FROM evr_releases ORDER BY rls_date DESC");
while($row = mysql_fetch_array($result)) {
if ($i < 4)
{
$i++;
echo "<td valign=top width=185><a href=releases.php?band_id=".$row["band_id"]. "&id=".$row["id"]. "><img src=images/covers/100/".$row["cover100"]. " width=100 height=100 border=0><br><b>".$row["band"]. "</b><br><i>".$row["title"]. "</i></a></td>";
}
}
echo "</tr></table><br><table border=0><tr><td colspan=4><img src=images/releases/uprls.gif></td></tr>
<tr>
<td valign=top width=185><a href=><img src=images/covers/100/evr083.jpg height=100 width=100 border=0><br><b>bandname</b><br><i>albumtitle</i></a><br>In stores 09.23.03</td>
<td valign=top width=185><img src= height=100 width=100 border=0></td>
<td valign=top width=185><img src= height=100 width=100 border=0></td>
<td valign=top width=185><img src= height=100 width=100 border=0></td>
</tr>
</table>";
}