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 'id_session = 'Dada de baja el 29-06-2016 a las 10:51:45' WHERE id_reg is null AN' at line 1