I may have just been looking at this for too long, but I fail to see the error. Any help would be appreciated.
The error:
Error occurred in [INSERT INTO 'PlayerSats' (username,character,FirstPlay) VALUES ('WaxyChicken','20','FALS')]: 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 ''PlayerSats' (username,character,FirstPlay) VALUES ('WaxyChicken','20','FALS')' at line 1
Do note that "PlayerSats" is not a typo and is properly capitalized.
The Code:
if ($Funct == "SETFIRSTPLAY") {
$sql = "INSERT INTO $PlayerStats (username,character,FirstPlay) VALUES ('$username','$Char','FALS')";
mysql_query($sql) or die("Error occurred in [$sql]: " . mysql_error());
echo "SUCCESS";
}
The table structure:
CREATE table PlayerStats (
ID int(10) unsigned not null auto_increment,
username char(20) not null default '' utf8_general_ci,
character char(2) not null default '00' utf8_general_ci,
invLand char(115) not null default '000:99' utf8_general_ci,
FirstPlay char(4) not null default 'true' utf8_general_ci,
Bank int(20) unsigned not null default 2000
);