Simply trying to add points to an existing value in a column named \'Points\'. I\'ve read a few articles that suggest the beneath, but it\'s not working for me. Perhaps because
If your column name starts with a number, you have to quote it in backticks:
$query = "UPDATE users SET Points=Points+3 WHERE `1A`=$m1A";
and:
$query1 = "UPDATE rounds SET `1A` = 1";
And I would recommend using a prepared statement with bound parameters to avoid sql injection problems.
Edit: If your 1A
column is not an integer column and the values are strings, you need to quote them.
$query = "UPDATE users SET Points=Points+3 WHERE `1A`='$m1A'";
^ ^
Although that problem would be solved automatically with a prepared statement...