I need to select all the entries for a 7 day period based on 1 date being supplied. In other words, if 2006-01-01 is selected, all entries from (and including) 2006-01-01 to(and including) 2006-01-07 would be returned. I am using a MySQL database.
No matter how I write the query, I can seem to isolate the 1 week. I either get all the result less than and equal or greater than and equal to the supplied date. In other words, I only want results from 2006-01-01 through 2006-01-07. Somehow, I manage to also get results from more than 1 week before or after as well.
Yes, but what I am trying to do is isolate THAT week. The way the query is now, it will also give results from before the selected date. The selected date should be the start of the results and find nothing exceeding 7 days later.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.