By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,836 Members | 1,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,836 IT Pros & Developers. It's quick & easy.

MYSQL/PHP using date differences to seperate data into tables..

P: 1
Relatively new to PHP and MySQL...

I've got a field named live_date as a date type field within my DB. I need to split the display table into M-F weeks, projected out from todays date based on the data records live_date..

IE:

today is 12-4-06

I need to display a table for data with a live_date between 12/4 and 12/9, another table for data between 12/10 and 12/16, etc..

I'm having trouble figuring out how to use the now() or currdate() function with intervals to do it.. or am I following the wrong track... should I be using date_format() through MySQL or date() through PHP...

the web pages displaying the info are PHP, and we're using PHPMyAdmin 2.8 and MySQL 5..
Dec 4 '06 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
Ever tried the MySQL DATE_ADD() function?
See MySQL documentation on date handling functions at http://dev.mysql.com/doc/refman/4.1/...functions.html

Ronald :cool:
Dec 4 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.