Jump to content

SQL error


tebrown

Recommended Posts

Hey Guys,

 

I've come across this error and yes i have tried to google it but haven't come across any help. Any suggestions?

 

Error: 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 'As WHERE id='34'' at line 1

 

<?php	

$player_id=$_GET['playerid'];
$toplayfor=$_GET['team'];

$move=mysql_query("UPDATE users SET team=$toplayfor WHERE id='$player_id'") or die(mysql_error());

if($move) {
    header('Location: players.php');
}

?>

Link to comment
https://forums.phpfreaks.com/topic/262659-sql-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.