I need to output data for today and the following week.
Here is what I have:
[PHP]// Get all the data from the table
$result = mysql_query("SE LECT * FROM $table where curdate() >= day AND curdate() < DATE_ADD(curdat e(),INTERVAL 7 day);")
or die(mysql_error ());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_arr ay( $result )) {
// Print out the contents of each row into a table
}[/PHP]
I have also tried:
[PHP]// Get all the data from the table
$result = mysql_query("SE LECT * FROM $table where curdate() >= day AND curdate() < day + 7;")
or die(mysql_error ());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_arr ay( $result )) {
// Print out the contents of each row into a table
}[/PHP]
Both of these only output the data with where day = curdate()
day is set to the date type with the default as 0000-00-00
i have mySQL 4.1.15
once again, I need to output data for today and the following week
thanks
Here is what I have:
[PHP]// Get all the data from the table
$result = mysql_query("SE LECT * FROM $table where curdate() >= day AND curdate() < DATE_ADD(curdat e(),INTERVAL 7 day);")
or die(mysql_error ());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_arr ay( $result )) {
// Print out the contents of each row into a table
}[/PHP]
I have also tried:
[PHP]// Get all the data from the table
$result = mysql_query("SE LECT * FROM $table where curdate() >= day AND curdate() < day + 7;")
or die(mysql_error ());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_arr ay( $result )) {
// Print out the contents of each row into a table
}[/PHP]
Both of these only output the data with where day = curdate()
day is set to the date type with the default as 0000-00-00
i have mySQL 4.1.15
once again, I need to output data for today and the following week
thanks
Comment