Jump to content

[SOLVED] You have an error in your SQL syntax; (@ symbol?)


Recommended Posts

I'm getting this error at the mo... not overly useful... Is there a problem with the @ symbol?

 

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 '@hotmail.com' at line 1

Here's the query...

 

mysql_query("INSERT INTO wholesale_tbl (wholesale_id, wholesale_name, wholesale_forename, wholesale_company, wholesale_add1, wholesale_add2, wholesale_add3, wholesale_city, wholesale_zip, wholesale_country, wholesale_tel, wholesale_fax, wholesale_email) VALUES ($password, $name, $forename, $company, $add1, $add2, $add3, $city, $zip, $country, $tel, $fax, $from") or die(mysql_error());

 

The variables are from a form...

Not sure maybe youll get an error but it will let you through if you put

 

mysql_query("INSERT INTO wholesale_tbl (wholesale_id, wholesale_name, wholesale_forename, wholesale_company, wholesale_add1, wholesale_add2, wholesale_add3, wholesale_city, wholesale_zip, wholesale_country, wholesale_tel, wholesale_fax, wholesale_email) VALUES ($password, $name, $forename, $company, $add1, $add2, $add3, $city, $zip, $country, $tel, $fax, $from") or echo(mysql_error());

 

And if you want to bypass the errors and let it still post try:

 

mysql_query("INSERT INTO wholesale_tbl (wholesale_id, wholesale_name, wholesale_forename, wholesale_company, wholesale_add1, wholesale_add2, wholesale_add3, wholesale_city, wholesale_zip, wholesale_country, wholesale_tel, wholesale_fax, wholesale_email) VALUES ($password, $name, $forename, $company, $add1, $add2, $add3, $city, $zip, $country, $tel, $fax, $from");

 

This should work? Maybe?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.