ncblazek
05-27-2008, 10:28 AM
Hello everyone! I am trying to get my SQL update command to work, but nothing updates and I get a SQL syntax reported back.
Here is my table creation query:
mysql_query("CREATE TABLE Name ( NameID INT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY, Lastname VARCHAR(50), Firstname VARCHAR(25), Title VARCHAR(10), E_ContactYN VARCHAR(3), EmailID INT(10));");
here is my update query that is having problems, any ideas?
mysql_query("UPDATE `Name` SET Lastname='$form[1]' WHERE NameID=$form[17];");
The SQL Error is:
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 '' at line 1
Here is my table creation query:
mysql_query("CREATE TABLE Name ( NameID INT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY, Lastname VARCHAR(50), Firstname VARCHAR(25), Title VARCHAR(10), E_ContactYN VARCHAR(3), EmailID INT(10));");
here is my update query that is having problems, any ideas?
mysql_query("UPDATE `Name` SET Lastname='$form[1]' WHERE NameID=$form[17];");
The SQL Error is:
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 '' at line 1