What I am up to here is fetching some data from mysql table within a week from today. My only challange is that Dates are stored in VARCHAR format D M d Y.
My table stored Date
example: Wed Jul 03 2016
My Code is:
$result = mysqli_query($con," SELECT * FROM `BIMTECH_academy_2016_classes` WHERE STR_TO_DATE(Date, '%D %M %d %Y') > DATE_SUB(NOW(), INTERVAL 1 WEEK) ORDER BY Date,From DESC; ");
while($row = mysqli_fetch_array($result))
{
echo $row['ClassNumber'];
echo $row['CourseName'];
echo $row['Date'];
echo $row['From'];
echo $row['To'];
}