[Solved] MySQL 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 [closed]


I assume that ‘username’ is a text/char field in your db. Try this code:

mysql_query ("SELECT * FROM " . $iAccount_table . " WHERE username="" . $user . """) or die(mysql_error());

I hope you find this helpful.

solved MySQL 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 [closed]