开发者

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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜