PDA

View Full Version : Date Call



kalasoft
10-09-2006, 08:30 PM
I have a php/html code that reads and displays data from a mysql database and the code is now working (http://www.girh.com/League/entire_schedule1.php). What I would like this code to do is show only toady's scheduled games (if any) and any game scheduled for the next six/seven days. I've attempted different date codes but am unable to get what I want to display. Can anyone lend me a hand?

AbelaJohnB
10-09-2006, 08:55 PM
kalasoft,

In order to answer this, we would need to know the date-stamp method your database is using. Is it using traditional mysql datestamps, unix datestamps, etc.

While functions exist to deal with the different methods, you can make it a lot easier by providing the date-stamp method for us.

kalasoft
10-09-2006, 09:02 PM
The mysql database is using the traditional date-stamp (Year-Month-Day).

nelis
10-10-2006, 02:25 PM
Well you would just add an addition condition to the mysql query

I've using something like


$query = "SELECT * FROM table1 WHERE scheduled_date = '".date("Y-m-d")."'";