Firstly, I'm sorry to make such a dumb question.
I never got to play with SQL on SM before but I've been searching for some time and now I'm confused, specially with SQL_TQuery and callbacks.
All i need is a fast UPDATE query, so this should be easy.
In PHP it would look like this:
PHP Code:
function UpdatePlayerPoints($steamID64, $amount)
{
$mysqli = mysqli_connect(SQL_HOST, SQL_USER, SQL_PW, SQL_DB);
if(!$mysqli){
return false;
}
$result = mysqli_query($mysqli, "UPDATE `users` SET `points` = `points` + '{$amount}' WHERE `steamID64` = '{$sid64}'") or die(mysqli_error($mysqli));
if($result){
return true;
} else {
return false;
}
mysqli_close($mysqli);
}
How would that look like ?
Thanks!
__________________