C
C
crack_user2021-06-21 22:26:15
PHP
crack_user, 2021-06-21 22:26:15

How to plus value in MYSQL?

Flew out of my head, how to correctly add to the current value of the mysql cell?

$info_id = mysqli_fetch_assoc(mysqli_query($link,"SELECT * FROM `clan_player` WHERE user_id = '".$message."'LIMIT 1"));
$querys = mysqli_query($link,"UPDATE clan_player SET  `rank = '".($info_id['rank']+1)."' WHERE user_id = '".$message."'");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spartak (Web-StyleStudio), 2021-06-21
@crack_user

mysqli_query($link, "UPDATE `clan_player` SET `rank`=`rank`+1 WHERE `user_id`='{$message}'");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question