Salve a tutti,
il proble è il seguente avendo un tabella (statistica) in mysql così:

codice:
statistica_articolo_id 	int(11) 	No   	  	 
statistica_articolo_visualizzazioni 	int(10) 	No
perche non funge facendo così?:

Codice PHP:
$statistica_articolo"INSERT INTO statistica 
                    (statistica_articolo_id, statistica_articolo_visualizzazioni) 
                VALUES 
                    ("
.$articolo_id.", 1) 
                ON DUPLICATE KEY 
                UPDATE 
                    statistica_articolo_visualizzazioni = VALUES (2)"
;
$query mysql_query($statistica_articolo$db) or die (mysql_error($db)); 
compare :

codice:
 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 '2)' at line 7