SELECT BrandId
FROM tbl_gf_category_brands
AND BrandId = 4
ORDER BY OrderBy ASC
LIMIT 0, 2
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 BrandId = 4
ORDER BY OrderBy ASC
LIMIT 0, 2' at line 3