Increment integer field in database when WHERE needs to be dynamic [closed]

Just noticed that you are missing a prepare.

Your code should look like this

$results = $wpdb->query($wpdb->prepare('UPDATE points SET upvotes = upvotes + 1 WHERE userid= %d', $theDynamicUserID));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)