i have a table where dates and other info are getting inserted...
i have a form where the user can select a start date end date..
based on the start date and end date ..i want to retrieve all the content stored between these dates.....
$sql="select * from table where (start_date between '$start_date' and '$end_date') or (end_date between '$start_date' and '$end_date')";
considering start_date and end_date are the columns of your table, the first condition will fetch the records if the start_date lies between the range of $start_date and $end_date (the user's input). similarly, it checks if end_date lies between the range.
i am doing attendance sheet..
wen the admin wants to check the attendance between two date then he will give the start and end date...
in the table there is one column for date...the table contain the user id(varchar) ,date(date),time(varchar)