Local Events



= CURDATE() ORDER BY date_start LIMIT 5"); //CONCAT(DATE_FORMAT(date_start, '%M %d'), ' - ', DAY(date_end)) newDate and in your php $dateSched = $rows['newDate']; echo "Date Start:   "; echo $dateSched; //SELECT * FROM events3 WHERE date_end >= CURDATE() ORDER BY date_start LIMIT 5; ::BEST ONE!! //http://stackoverflow.com/questions/2597098/get-the-last-n-rows-in-the-database-in-order //SELECT * FROM events ORDER BY date_start DESC LIMIT 5 ::Works but still need to reverse order //SELECT * FROM events ORDER BY id DESC LIMIT 5; //SELECT * FROM events ORDER BY id DESC LIMIT 5; //WHERE year = '2012' //fetch results WHILE($rows= mysql_fetch_array($query)): $id = $rows['id']; $title = $rows['title']; $admission = $rows['admission']; $date_start = $rows['date_start']; $date_end = $rows['date_end']; $dateSched = $rows['newDate']; $time_start = $rows['time_start']; $time_end = $rows['time_end']; $location = $rows['location']; $description = $rows['description']; $image = $rows['image']; $hyperlink = $rows['hyperlink']; ?> ID:   "; echo "$id
"; echo "Title:   "; echo "$title
"; if ($admission == null ){ echo " "; }else{ echo "Admission:    "; echo "$admission
"; } //Date Display echo "Date Start:   "; echo "$dateSched
"; //echo "$date_start"; echo ' - '; echo "$date_end
"; //Time Display echo "Time Frame:   "; echo date('g:i a',strtotime($time_start)); echo" - "; echo date('g:i a',strtotime($time_end)); echo"
"; // echo "$time_start"; echo " - "; echo "$time_end
"; echo "Location:   "; echo "$location
"; echo "Description:   "; echo "$description


"; endwhile; // SELECT * FROM events ORDER BY id DESC LIMIT 10; ?>