2012-06-26 94 views
0

我試圖通過每24小時只插入唯一值來跟蹤頁面視圖。但是當我運行這個查詢時,我得到一個語法錯誤。Mysql語法錯誤:'WHERE NOT LIKE'

insert ignore into profilepageviews values('77.777.777.777' , CURRENT_TIMESTAMP, '5') where hitdate NOT LIKE '%2012-06-26%' 

錯誤:

#1064 - 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 'where hitdate NOT LIKE '%2012-06-26%'' at line 1 
+0

什麼是忽略SQL關鍵字 –

回答

3

不能使用WHERE條款與INSERT,你可能想UPDATE