Created
October 3, 2015 02:59
-
-
Save gerasimua/ef4e2a7f9284ffe68744 to your computer and use it in GitHub Desktop.
On duplicate update all values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO sessions (user_id, token, expires, session_data) | |
VALUES (?, ?, FROM_UNIXTIME(?), ?) | |
ON DUPLICATE KEY UPDATE user_id=VALUES(user_id), expires=VALUES(expires), session_data=VALUES(session_data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment