MYSQL中的UPDATE子句可以使用PHP在一个查询中更新多个记录吗?

well i have this messages table with sample values like these:

msg_id  recipient_id   read   locked   new
  0         1            N       Y      Y
  2         1            Y       N      N

ok, so lets just say this is a messaging table, and i want to reset all messages addressed to recipient with id=1

i was wondering why

UPDATE `messages` SET `new`='Y',`read`='N',`locked`='N' where `recipient_id`=1;

doesn't work, MYSQL always returns 0 affected rows... can anyone help me?

to robert gamble: yes, im sure the values were changed, since my purpose for this update query is to reset the data i was using for the testing phases :D

You have some floating single-quotes in there. You may be assigning one string to another or something.

It's ok to just say

UPDATE messages  
SET new = 'y', read = 'N', locked = 'N'  
WHERE recipient_id = 1