I have programmed a system which allows administrator to add bacthes. (Basic details + Date of Start and End date). The date format is YYYY/MM/DD. Type : VARCHAR (50). Shoud I use different type (Need expert advice)
I need to list the upcoming and ongoing batches
This is the query which i think would return the ongoing projects
SELECT * FROM PROGRAMMES WHERE 'startdate' <= '$currentdate' AND 'enddate' > '$currentdate'
and for Upcoming projects
`SELECT * FROM PROGRAMMES WHERE 'startdate' >= '$currentdate`'
But I'm unsure about the results.. Since the value is stored in VARCHAR (Would it fetch my required results).. Should i use a different data type for date.. If so please specify
I couldn't understand much from PHP tutorials as everywhere its different.. Could someone guide me with the most commonly used method.
Thanks