MySQL query syntax with email addresses
Posted: Mon May 29, 2006 1:34 am
Hey guys. In my php code I want it to insert data into a database. When I try to do this, it returns this error:
Thanks for any help.
I think it might be confusing the @ character. Here is the original code: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 '@yourdomain.com,name)' at line 1
Code: Select all
$query1 = "INSERT INTO Users(uname,pass,email,name) VALUES ($uname,$pass,$email,$name)";
mysql_query($query1)or die(mysql_error());