RE: sql insert where statment need help 0.o??? 06-02-2017, 06:58 AM
#2
With your SQL INSERT INTO Statement, you've enclosed the id column In single quotes and you haven't ended your SQL query In a semicolon, hence the syntax error near "WHERE".
The value of '100' Is fine (single quotes), but given the id column Is only one word (not separated) you can either enclose It In "Back Ticks", or leave It as Is, but NOT single quotes.
Example:
Column In Back Ticks
No Back Ticks
Either of the two will work. Don't forget to use the semicolon at the end of the statement.
The value of '100' Is fine (single quotes), but given the id column Is only one word (not separated) you can either enclose It In "Back Ticks", or leave It as Is, but NOT single quotes.
Example:
Column In Back Ticks
Code:
WHERE (`id`) = ('100') ;
No Back Ticks
Code:
WHERE (id) = ('100') ;
Either of the two will work. Don't forget to use the semicolon at the end of the statement.
![[Image: AD83g1A.png]](http://i.imgur.com/AD83g1A.png)