OK, this is driving me nuts.
Here's the code in question:
$thisweek = strftime("%W");
$sql = "SELECT * FROM NIGHTS WHERE WEEK(DATE) = WEEK('$thisweek')";
The row DATE holds dates in UNIX timestamp format (988689600) - what I want to do is, return all the rows where the week index number matches this week.
The value of $thisweek is 18 (it is just now, anyway), and I know there are dB rows with DATE values that would also equate to WEEK 18. But mySQL doesnt return any results. It doesnt give any errors, just doesnt return any results.
Can someone *please* tell me what I'm doing wrong, or tell me a better way to do this? This is the last thing left that I need to do for this site.
Thanks,
Kerin
Here's the code in question:
$thisweek = strftime("%W");
$sql = "SELECT * FROM NIGHTS WHERE WEEK(DATE) = WEEK('$thisweek')";
The row DATE holds dates in UNIX timestamp format (988689600) - what I want to do is, return all the rows where the week index number matches this week.
The value of $thisweek is 18 (it is just now, anyway), and I know there are dB rows with DATE values that would also equate to WEEK 18. But mySQL doesnt return any results. It doesnt give any errors, just doesnt return any results.
Can someone *please* tell me what I'm doing wrong, or tell me a better way to do this? This is the last thing left that I need to do for this site.
Thanks,
Kerin