Date: 03/06/06 (MySQL Communtiy) Keywords: no keywords I am trying to select records in a date range, but with this query I am not having any records returned. When I remove the BETWEEN statement and dont limit the range, I get results. Dates are yyyy-mm-dd format. SELECT invoice_items.caregiver_id, sum(((TIME_TO_SEC(invoice_items.end_time) - TIME_TO_SEC(invoice_items.start_time))/3600)) AS invoice_hours, employees.EmployeeID, employees.LastName, employees.FirstName FROM invoice_items LEFT JOIN employees ON invoice_items.caregiver_id=employees.EmployeeID WHERE invoice_items.office_id ='$office_id' AND invoice_items.item_date BETWEEN $ServRange1 AND $ServRange2 GROUP BY invoice_items.caregiver_id ORDER BY employees.LastName
|