oakes6b2 Posted March 3, 2007 Share Posted March 3, 2007 What would be the best way to filter a MySQL recordset to show only the last 6 months? I am a pilot and I have a db that has my flight information and I want to display how many instrument approaches I have done in the last 6 months! Thanks in advance. Oops...wrong forum. Please move Link to comment https://forums.phpfreaks.com/topic/41055-filter-by-date/ Share on other sites More sharing options...
fenway Posted March 4, 2007 Share Posted March 4, 2007 Add this to your WHERE clause: yourDateField >= NOW() - INTERVAL 6 MONTH Link to comment https://forums.phpfreaks.com/topic/41055-filter-by-date/#findComment-199171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.