{"sql":"\nselect \n b.id,\n DATE_FORMAT(b.ptime, '%Y %M %d') as day, \n TIME_FORMAT(b.ptime, '%H:%i') as time, \n b.distance,\n b.estimate,\n IF(b.type = 1, 'true', null) as type,\n picklocation.name as picklocation_name, \n droplocation.name as droplocation_name,\n IF(b.ptime < :now && b.state < 2, 'true', null) is_expired,\n IF(b.state < 2, 'true', null) as is_pending,\n IF(b.state = 2, 'true', null) as is_completed\nfrom \n taxi_bookings as b,\n taxi_locations as picklocation,\n taxi_locations as droplocation\nwhere \n picklocation.booking = b.id AND \n picklocation.type = 1 AND \n droplocation.booking = b.id AND \n droplocation.type = 2 AND\n b.ref = :user AND\n b.state != 3\norder by \n b.ptime desc","input":{"user":false,"now":"2025\/07\/27 03:05"},"success":true,"data":[{"id":"4062","day":"2020 October 13","time":"02:54","distance":"4","estimate":"7","type":null,"picklocation_name":"Shalimar Hotel","droplocation_name":"Meethotamulla Garbage Dump","is_expired":"true","is_pending":"true","is_completed":null,"rate":"3"}],"count":1,"stats":{"earned":"0","active":"1"}}