Programming
MySQL: Increase field value by 1 (simple way)
by admin on May.17, 2011, under Programming
Increasing the value of a MySQL value is pretty simple. The most easy way I can think of is to increase the value directly in an update query. It is a very quick solution and works neatly:
UPDATE hits SET count=count+1 WHERE page='google.com';
Explanation: The query is going to add 1 to the field count in the table hits where page = google.com