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 'condition ON condition.c_ID = inventory.i_condition LEFT JOIN line ON line.l_I' at line 3