Jump to content

sql syntax error when trying to insert a row into databse


spenceddd

Recommended Posts

Hi,

 

My form is trying to add an item to the database when a button is clicked using this extract from my code:

 

$query="INSERT INTO Portfolio.skillsList ('ID','NAME') VALUES (NULL ,'$_POST[skillField]')";	

 

The error is as follows:

 

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 ''ID','NAME') VALUES (NULL ,'IOIOI')' at line 1

 

Does anyone have any ideas as to what is wrong with the syntax?

 

Thanks a lot.

 

Spencer

Archived

This topic is now archived and is closed to further replies.

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