A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/packagetour.php

Line Number: 187

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/choowap/public_html/system/libraries/Exceptions.php:166)

Filename: codeigniter/Common.php

Line Number: 356

Database Error

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 a.pt_tag LIKE '%7%' GROUP BY a.pt_id ORDER BY a.prior DESC, a.pt_id' at line 6

SELECT a.*,b.* FROM package_tour a LEFT JOIN (SELECT * FROM package_gallery ORDER BY weight DESC,pg_id DESC) as b ON a.pt_id = b.pt_id WHERE a.lang_id = 12 AND a.loca_id = AND a.pt_tag LIKE '%7%' GROUP BY a.pt_id ORDER BY a.prior DESC, a.pt_id DESC