MySQL INSERT WHERE
I have a stupid little SQL query which isn't working and i can't figure out why
SE开发者_运维知识库LECT * FROM `tablename` WHERE `id` = '294' INSERT INTO 'auth' VALUES 'false'
I want to select the row which pertains to the id (294) and insert the value false into the 'auth' column, but i keep getting a #1064 error.
Can someone correct the above?
embarrassed,
Dan
You just want to update the '294' record and set its 'auth' value to 'false', correct? If so:
update tablename set auth = 'false' where id = 294;
you want to do an update not an insert.
Update 'tablename' set 'auth' = 'false' where 'id' = '294'
精彩评论