Hi Guys,
I'm trying to write out a table of data using a mysql query with the restraint of the data being for "this week" based on sunday as the cutoff.
For some reason the mysql isn't evaluating correctly, can someone give me any pointers as to what I'm doing wrong? I've used print_r to look at the vals of the strtotime variables, including an actual value from my database, and the numbers given make sense - ie: my db val is between the two sundays, but it doesn't display the data.
I've tried it with 'BETWEEN' as well, but dropped back to the below for testing just one condition, which is the weirdest part, originally I was having it display nothing when putting the 'less than next sunday' constraint, now it seems to be the other way around (but surely I'm dreaming that!?).
Code is below, thanks,
JM
$date_1 = strtotime("last sunday");
$date_2 = strtotime("sunday");
$link1 = "SELECT * FROM progress WHERE ipg_project_num=$ipg_project_num AND date<$date_2 AND date>'$date_1'";