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 price.ID_ITEM= AND item.ID_BRAND=brand.ID_BRAND and item.ID_TYPE=type.ID_TYP' at line 2!