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 '' at line 1select prods.prod_id,prod_title from hs_system_products sysprods INNER JOIN hs_products prods on sysprods.product_id = prods.prod_id where sysprods.system_id=