topflight Posted April 20, 2009 Share Posted April 20, 2009 I need help with something I have a table called hours in the database and in that table I have a field called date. With that saying I want to get all the members from the database that haven't filed anything after 30 days after his/her last hour input how can I do that? Quote Link to comment Share on other sites More sharing options...
topflight Posted April 20, 2009 Author Share Posted April 20, 2009 anything? Quote Link to comment Share on other sites More sharing options...
alphanumetrix Posted April 21, 2009 Share Posted April 21, 2009 what's the date format? unix? Quote Link to comment Share on other sites More sharing options...
topflight Posted April 21, 2009 Author Share Posted April 21, 2009 m.d.year Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted April 21, 2009 Share Posted April 21, 2009 Give this a try: mysql_query("SELECT * FROM hours WHERE DATE_SUB(DATE_FORMAT(CURDATE(),'%c.%e.%Y'), INTERVAL 30 DAYS)"); Quote Link to comment Share on other sites More sharing options...
topflight Posted April 22, 2009 Author Share Posted April 22, 2009 that doesn't work I receive an error message. it seems the x for the error message is this line here: CURDATE( ) , '%c.%e.%Y' ) , INTERVAL 30 DAYS Quote Link to comment Share on other sites More sharing options...
topflight Posted April 23, 2009 Author Share Posted April 23, 2009 any other help please Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.