the $points variable is the user´s points right now.. so example if he had like 5 points, it should be 5 1 = 6..
Another way is to run your update query with a My SQL variable that generates an increasing number for each row (to emulate the ROW_NUMBER() function found in other DBMS systems). If IGNORE is provided, all errors encountered during the update are ignored.If an update on a row would result in a violation of a primary key or unique index, the update on that row is not performed.Only the partitions (or subpartitions) listed are checked for matches, and a row that is not in any of these partitions or subpartitions is not updated, whether it satisfies the clause, are flagged as unsafe for statement-based replication.(This is because the order in which the rows are updated determines which rows are ignored.) With this change, such statements produce a warning in the log when using statement-based mode and are logged using the row-based format when using mode.This will use the SQL UPDATE command with the WHERE clause to update the selected data in the My SQL table tutorials_tbl.