user1217380
user1217380

Reputation: 629

Mysql syntax error : 'WHERE NOT LIKE'

I'm trying to track the page views by inserting only unique values every 24h.But when I run this query I get a syntax error.

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

Error:

#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

Upvotes: 0

Views: 209

Answers (1)

Shakti Singh
Shakti Singh

Reputation: 86336

You can not use WHERE clause with INSERT, You might want UPDATE

Upvotes: 3

Related Questions