A Database Error Occurred

Error Number: 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 o.trip_type != 2' at line 9

SELECT o.fare, o. trip_type, c.name as car_name, p.name as pick_city, dp. name as drop_city FROM out_station as o LEFT JOIN car c ON o.car_id = c.id LEFT JOIN city p ON o.pick_city = p.id LEFT JOIN city dp ON o.drop_city = dp.id WHERE p.id = 23 AND dp.id = AND o.trip_type != 2

Filename: models/Out_station_model.php

Line Number: 239