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 'CHANEL"",DAYOFMONTH(NOW()),MONTH(NOW()),YEAR(NOW()),CURDATE())' at line 2 SQL=INSERT INTO jos_Stalytics_PI_count (site_name,month_day,month,year,visit_date) VALUES ("Portaconfetti "CHANEL"",DAYOFMONTH(NOW()),MONTH(NOW()),YEAR(NOW()),CURDATE())