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? Link to comment https://forums.phpfreaks.com/topic/100827-mysql-query-after-a-form-submission/ 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 Link to comment https://forums.phpfreaks.com/topic/100827-mysql-query-after-a-form-submission/#findComment-515637 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!! Link to comment https://forums.phpfreaks.com/topic/100827-mysql-query-after-a-form-submission/#findComment-515650 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.