A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: core/MY_Controller.php

Line Number: 92

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/gplace/public_html/system/core/Exceptions.php:185)

Filename: core/Common.php

Line Number: 438

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 '=2,g_brand,g_brand_th)as p_name ,CONCAT('https://www.gplace.com/include/img/' at line 1

SELECT '#' as p_id,IF(=2,g_brand,g_brand_th)as p_name ,CONCAT('https://www.gplace.com/include/img/',g_pic)as p_pic,'' as p_pic2 ,'' as choowap_addi_id ,'' as choowap_ht_id ,IF(=2,g_name_en,g_name_th) as p_detail_h ,'' as p_view ,(DEGREES(ACOS(LEAST(COS(RADIANS(13.7038811)) * COS(RADIANS(REPLACE(g_lat,' ',''))) * COS(RADIANS(100.5157936 - REPLACE(g_long,' ',''))) + SIN(RADIANS(13.7038811)) * SIN(RADIANS(REPLACE(g_lat,' ',''))), 1.0))) * 111.111) AS distance ,(g_lat)as p_map_lat,(g_long)as p_map_long FROM gp_gas WHERE '13.7038811' BETWEEN g_lat-0.15 AND g_lat+0.15 AND '100.5157936' BETWEEN g_long-0.15 AND g_long+0.15 AND g_pic != '' ORDER BY distance ASC LIMIT 50

Filename: /home/gplace/public_html/models/gp_v2_model.php

Line Number: 809