Hi, I'm currently using the following SQL for retrieving the last seven days worth of entries from a table:
purchased >= date_sub(now() ,interval 7 day)
However, I need to change this so it retrieves the last full weeks worth of entries (midnight Saturday to midnight Saturday). So basically, throughout the week the results never change, but when someone visits on Sunday morning they will have refreshed.
I just cant get my head around how to work out the days etc. Also, are there built in MySQL functions for doing this?
I hope I've explained that clearly enough. This is in a PHP application.
Thanks, Jack