Search in MySQL Database based on Date Range provided by the user

wujian

New Member
I'm a novice in PHP & MySQL coding and still working my way through it.. So, little help on this will be much appreciated:I have a table that keeps record of certain events. Here is how my table looks like:\[code\]Id - Event_Name - Event_Date - Event_Charges---------------------------------------------1 - Event 1 - 10/10/2010 - $1002 - Event 2 - 10/31/2010 - $2003 - Event 3 - 11/12/2010 - $1504 - Event 4 - 12/01/2010 - $175\[/code\]The objective here is to List the name of Events and total up the charges for a particular Date range...My front end form looks like this:\[code\]From Date: ____________To Date: ______________\[/code\]The user enters these two fields and i'm supposed to List the Events falling in that date range, and total up the charges. Please note that Event_Date field is not of field type "date" in MySQL.. Should i have the Event_Date field of field type "date".
 
Back
Top