Cita: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'qqqqqqqqq', '12-05-2016' at line 1
Eso es un problema de sintaxis de SQL, así que ya no es un problema de código PHP.