I have a MySQL database table called submission with a field called points with a type of bigint(100).
On a PHP file, I have a variable called $commentpoints with a numerical value.
In the PHP file, how could I add $commentpoints to points?
It’s a matter of adding it in your SQL update query:
That will add the value of
$commentpointsto the points in the database; just make sure to use the where clause so you don’t add it to every record in the submissions table.