Jump to content

updating several rows


will41

Recommended Posts

hi how is everyone today? this is my first post

i have a table that has 4 columns

id formation type  image path

what i need is to update sevral rows for the type when it matches the id

 

i have tried

update set type = 2 where id = 2 and id = 4  that didnt work

tried

update set type = 2 where id = 2,4              that did not work

 

tried

UPDATE `plays` SET `type`=

CASE   

      WHEN `id`=2       

THEN `type` = 2   

      WHEN `id`=4     

THEN `type` = 2

    ELSE       

THEN `type'

END

WHERE    `ID` IS NOT NULL  did not work

 

Can someone help me with this  thanks wil41

Link to comment
https://forums.phpfreaks.com/topic/246120-updating-several-rows/
Share on other sites

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.