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 '('RealName') VALUES ('Louise T') WHERE SteamID='7656119801402xxxx'' at line 1
$mysql_hostname = "localhost";
$mysql_user = "xxxx";
$mysql_password = "xxxx";
$mysql_database = "xxxx";
$prefix = "";
$conn = mysql_connect($mysql_hostname, $mysql_user, $mysql_password);
$connect = mysql_select_db($mysql_database, $conn);
$realname = 'Louise T';
$steamid = '7656119801402xxxx';
$sql="UPDATE users SET ('RealName') VALUES ('". mysql_real_escape_string($realname) ."') WHERE SteamID='$steamid'";
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
} else {
header("Location: index.php");
exit();
}
I don't know what this is caused by? I have been checking every single word for if it were interfering with some of the MySQL commands and still seem to get this error..
This is some rules I found online:
- You have omitted, or included an unnecessary symbol: !@#$%^&*()-_=+[]{}|;:'",<>/?
- A misplaced, missing or unnecessary keyword: select, into, or countless others.
- You have unicode characters that look like ascii characters in your query but are not recognized.
- Misplaced, missing or unnecessary whitespace or newlines between keywords.
- Unmatched single quotes, double quotes, parenthesis or braces.
But I really don't think there is anything like it?