wrathican Posted April 12, 2008 Share Posted April 12, 2008 well i have a database with lots of entries. what i want to do is create a form for day/month/year and submit it. when the form is submitted it queries the database fetching all the results since the date i selected with the form. is there a way i could do this with a query? instead of a loop or something in php? Quote Link to comment Share on other sites More sharing options...
amites Posted April 12, 2008 Share Posted April 12, 2008 make sure you get your date into a YYYY-MM-DD format = $date then add a WHERE statement to your query WHERE date_field BETWEEN $date AND now() should work, depending on your DB structure Quote Link to comment Share on other sites More sharing options...
wrathican Posted April 12, 2008 Author Share Posted April 12, 2008 ahh thats exactly what i wanted... thanks alot!! 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.