Hi i have this query that search data between two date range
select RA, Name, Model, Plate, Service, Grand_total, Payment_type from advance WHERE SDate BETWEEN '" . $from . "' AND '" . $to . "' ORDER BY Payment_type
which is working great but i need to alter it so that it will also search for specific time range between that date range but seems not working properly
"select RA, Name, Model, Plate, Service, Grand_total, Payment_type from advance WHERE SDate BETWEEN '" . $from . "' AND '" . $to . "' AND Time BETWEEN '" . $fromtime . "' AND '" . $totime . "' ORDER BY Payment_type
my table structure for SDate is date and for Time is time
what am i doing wrong..?