mysql add to value

Solutions on MaxInterview for mysql add to value by the best coders in the world

showing results for - "mysql add to value"
Alienor
16 Feb 2020
1UPDATE addingValueToExisting SET GameScore = GameScore+10 WHERE Id = 4;
2
Sofie
21 Aug 2020
1<?php
2$con = mysql_connect("localhost","peter","abc123");
3if (!$con)
4  {
5  die('Could not connect: ' . mysql_error());
6  }
7
8mysql_select_db("my_db", $con);
9
10mysql_query("UPDATE `some_table` SET `value` = `value` + 1000 WHERE `id` = 1");
11
12mysql_close($con);
13?>