I have been playing with this photo album script for a while and it works just fine but I'm having problems ordering the pictures by the date. I have one page that displays all the thumbnails and since the new year it's all out of order.. I've tried a couple of things but, I'm still pretty green and I can't figure it out. I would like for it to display all the pics starting with the most recent pictures to the oldest.
Thanks in advance for your help!
PHP Code:<?
//////// My query that is probably all screwed up
$sql = mysql_query("SELECT * FROM photo_album ORDER BY pmonth desc, pday desc, pyear desc");
echo '<table align=center>';
// Check to see if any results were returned
if(mysql_num_rows($sql) > 0){
echo '<tr>';
// Loop through the results
while($row = mysql_fetch_array($sql)){
echo 'Bla Bla Bla Bla';
?>



Reply With Quote

Bookmarks