I know how to do Basic Querys with PHP and mySql. Yet I have confusion when it comes to mySql date functions. I currently have a Sql statment like so:
PHP Code:<?
$sql="SELECT * FROM $table_name WHERE `date` BETWEEN DATE_SUB(CURDATE(), INTERVAL 6 DAY) and DATE_ADD(CURDATE(), INTERVAL 1 DAY) ORDER BY 'bar'";
?>
This is the product of people helping me here. What this does (what you probally already know) is take a listing that i enter in at a certain date in the week. and display it for a week then on monday. for the current week.
I would like to keep with this same format but . I would like it to display from today til one month from now. More inporantly I would like a explanation on how this date thing works because I deal with events and dates are everything. Thanks for any help you can provide me with.
MySql 4.1.14-standard
PHP version 4.4.1


Reply With Quote
Bookmarks