I have this code, which lets me pull records from the 'created' column for todays date & time:
Quote:
SELECT * FROM table WHERE created >= CURRENT_TIMESTAMP;
|
What I'd like to do is have it pull records from the last 30 +/- days
AND todays date, could anyone point me in the right direction as to how to make this happen?
Just to complicate it a little, Id like it to pull based on the month, so whether a recipe was added last year, 10 years ago, etc it'll still display the data as described below.
Basically, I'm wanting a pseudo page on my recipe site that gives visitors a list of 30 recipes for breakfast, lunch and dinner (that are recent additions) which will change every day, cycling through the last 90 recipe additions (per category)s, sort of like how the old POTD pages used to work.
TIA for any help.