Time : 15:59:54 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pre_assigned_helper' in 'field list' Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude, h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 -- 1️⃣ Do not select providers who already accepted/started a booking today AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) -- 2️⃣ Do not select providers who are already pre-assigned AND h.id NOT IN ( SELECT DISTINCT pre_assigned_helper FROM rt_booking_on_the_go WHERE pre_assigned_helper IS NOT NULL ) -- 3️⃣ Must be available (optional) -- AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.last_seen DESC LIMIT 1 Time : 15:03:12 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pre_assigned_helper' in 'field list' Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude, h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 -- 1️⃣ Do not select providers who already accepted/started a booking today AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) -- 2️⃣ Do not select providers who are already pre-assigned AND h.id NOT IN ( SELECT DISTINCT pre_assigned_helper FROM rt_booking_on_the_go WHERE pre_assigned_helper IS NOT NULL ) -- 3️⃣ Must be available (optional) -- AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.last_seen DESC LIMIT 1 Time : 14:49:12 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE booking_app_id = ? LIMIT 1' at line 3 Raw SQL : UPDATE rt_booking_on_the_go SET pre_assigned_helper WHERE booking_app_id = ? LIMIT 1 Time : 14:48:41 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.amount, h.last_seen FROM rt_service_providers h ' at line 1 Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) -- AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.last_seen DESC LIMIT 1 Time : 14:48:17 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'h.provider_rating' in 'field list' Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude, h.provider_rating, h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) -- AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.provider_rating DESC, h.last_seen DESC LIMIT 1 Time : 14:47:42 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'h.rating' in 'field list' Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude, h.rating, h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.rating DESC, h.last_seen DESC LIMIT 1 Time : 14:47:40 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'h.rating' in 'field list' Raw SQL : SELECT h.id AS provider_id, h.provider_name, h.latitude, h.longitude, h.rating, h.amount, h.last_seen FROM rt_service_providers h WHERE h.amount > 55 AND h.id NOT IN ( SELECT DISTINCT provider_id FROM rt_booking_on_the_go WHERE DATE(date_time) = CURDATE() AND booking_status IN ('Accepted', 'Started') ) AND h.is_available = 1 ORDER BY (POW(h.latitude - 31.1075588, 2) + POW(h.longitude - 77.1959622, 2)) ASC, h.rating DESC, h.last_seen DESC LIMIT 1 Time : 14:11:35 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN('Requested') AND pre_booking='true' AND TIMESTAMPDIFF(MINUT' at line 3 Raw SQL : SELECT * FROM rt_booking_on_the_go WHERE booking_status = IN('Requested') AND pre_booking='true' AND TIMESTAMPDIFF(MINUTE, date_time, NOW()) >= 1 Time : 14:11:33 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN('Requested') AND pre_booking='true' AND TIMESTAMPDIFF(MINUT' at line 3 Raw SQL : SELECT * FROM rt_booking_on_the_go WHERE booking_status = IN('Requested') AND pre_booking='true' AND TIMESTAMPDIFF(MINUTE, date_time, NOW()) >= 1 Time : 14:11:15 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN('Requested','Schedule') AND pre_booking='true' AND TIMESTAM' at line 3 Raw SQL : SELECT * FROM rt_booking_on_the_go WHERE booking_status = IN('Requested','Schedule') AND pre_booking='true' AND TIMESTAMPDIFF(MINUTE, date_time, NOW()) >= 1 Time : 06:39:54 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4 Raw SQL : SELECT COUNT(*) AS total_count FROM rt_booking_on_the_go WHERE provider_id='16' AND booking_status='Cancelled' AND cancelled_by='customer' AND MONTH(date_time) = MONTH(CURRENT_DATE) AND YEAR(date_time) = YEAR(CURRENT_DATE) AND Time : 06:26:42 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND DATE(date_time) = CURDATE() AND provider_id=16' at line 1 Raw SQL : SELECT COUNT(*) AS total_count from rt_booking_on_the_go where cancelled_by ='Provider') AND DATE(date_time) = CURDATE() AND provider_id=16 Time : 06:26:29 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND DATE(date_time) = CURDATE() AND provider_id=16' at line 1 Raw SQL : SELECT COUNT(*) AS total_count from rt_booking_on_the_go where cancelled_by ='Provider') AND DATE(date_time) = CURDATE() AND provider_id=16 Time : 06:25:52 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND DATE(date_time) = CURDATE() AND provider_id=16' at line 1 Raw SQL : SELECT COUNT(*) AS total_count from rt_booking_on_the_go where cancelled_by ='Provider') AND DATE(date_time) = CURDATE() AND provider_id=16