Select * from table where Startdatetime<='".$currentdatetime."' AND '".$currentdatetime."'<=t.Enddatetime
$currentdatetime
is my variable containing the current date and time in 'Y-m-d H:i:s' format.
My problem is that MySQL is checking the date part properly, but the time is not considered in the check. What am I doing wrong?