operand should contain 1 column UPDATE
-
20-06-2021 - |
Question
what sql statements should i use to do something like this?
UPDATE
`table1`
SET
`media` = 'url'
WHERE
`media` = '3' AND `forum_post_id` = ('109918','109949','109882','109819','109822')
right now i am getting the operand should contain 1 column error
Solution
Use "IN":
UPDATE `table1`
SET `media` = 'url'
WHERE`media` = '3' AND `forum_post_id` IN ('109918','109949','109882','109819','109822')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow