I'm trying to post values into db but this is getting a bit to tricky for me. Since there gonna be multiple posts with "username" each date I can't make any of these a key value.
So I was thinking, if i put a value called "kay" that throws date combined with user this can be made key since that combined value never will be throwed twice and work as wanted..
But my query wont work, guessing it's a problem posting this as a string?
INSERT INTO hsm_static (date, username, stats, stats5, stats16,
stats20, kay) VALUES (CURDATE(), username, 1, 0, 0,0,usernameCURDATE()) ON
DUPLICATE KEY UPDATE stats=stats +1 WHERE username=username AND date = CURDATE()
Anyone got a solution? Feels like I've tried everything with no luck.. Thankful for any help!