How is the best way to query mysql to increase a field by one?
This is what want to do:
I have some info about a user in a database, and each time the user logs in I want to increase the field "num_of_logins" (which is a small_int UNSIGNED) by one.
Do I have to do a SELECT-query first to get the value of "num_of_logins" then increase the value by one, and then do a UPDATE-query, or is there a better and faster way to just increase the small_int value directly in the UPDATE-query?
/Josef