Fatal error: Uncaught Exception: 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 'a.slug '' group by brandName order by brandName ASC' at line 1 query: SELECT brandName,brandslug FROM `ci_styles` where brandslug = '' a.slug '' group by brandName order by brandName ASC in /var/www/html/includes/MysqliDb.php:1819 Stack trace: #0 /var/www/html/includes/MysqliDb.php(430): MysqliDb->_prepareQuery() #1 /var/www/html/includes/functions.php(4776): MysqliDb->rawQuery('SELECT brandNam...', Array) #2 /var/www/html/styles.php(105): checkBrandExists('' a.slug '') #3 {main} thrown in /var/www/html/includes/MysqliDb.php on line 1819