I am currently trying to setup a game.
I have tried a lot of things but nothing seems to have worked so far
$sql = "
select username
, safe_username
from users
where id = $userid;
UPDATE users
SET username = '$newusername'
where id = $userid
";
Error: select username, safe_username from users where id = 10; UPDATE users SET username = 'Deaga' where id = 10
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE users SET username = 'Deaga' where id = 10' at line 1
I expected it to work. i am trying to setup a game. if you could help me thank you very much i am new to coding and i don't really know what to look for when i get these kind of errors.