Last 5 days of news in db

admin

Administrator
Staff member
okay, say i have a table that stores news and dates....and i want to grab the last 5 days worth of stories....there may be more than 1 story per day. i was going to use something like

SELECT * FROM news ORDER BY date DESC LIMIT 5

but i don't think that will work, will it? That will only return 5 entries, where their might be 20, but i just want the last 5 days worth...and actually, it might not be 5 consec. days, i just want the last 5 days that stories were actually entered into the database..so you might have nov 24th, nov 20th, sept 20th, august 10th, etc...with each day having multiple entries...
 
Back
Top