So, here's the query (copied and pasted from browser, echoed directly from the php code.)
INSERT INTO Azioni_report (Chiusa, Data, Descrizione, ID_report, IntEst, Tipo, Responsabile)
VALUES (0, CONVERT(date, '2-12-2014', 105), 'verifica dell''efficacia', 1049, 1, 2, 12)
If I run it from my "test page", it works fine. When I run the exact same query in the page where I need it, it gives this error:
Array ( [0] => Array ( [0] => 42000 [SQLSTATE] => 42000 [1] => 102 [code] => 102 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'efficacia'. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'efficacia'. ) ) 1
I'm using SQL server.