Mysql. How to add field with type set another value for all rows in the table?

For example, there is a field notify type is set it has a choice in the form of: email, sms, phone, post.

Each user himself has chosen how to notify you want to add alerts by email.

You can loop all the values in the php script and add those from whom there update each row using update.

Is it possible to do the same thing in a single request and not to kill other selected methods of the alert from the user.

That is, if the user selected sms, the phone should be sms,phone,email,
October 8th 19 at 02:36
2 answers
October 8th 19 at 02:38
Solution
UPDATE table SET notify = anyone of parameters(',', myset, 'phone')

not?
whew. UPDATE table SET notify = anyone of parameters(',', notify, 'phone') this - anais_Littel34 commented on October 8th 19 at 02:41
Not vkuril your request, where is email? - Eulalia22 commented on October 8th 19 at 02:44
whew. UPDATE table SET notify = anyone of parameters(',', notify, 'email') WHERE FIND_IN_SET('email', notify) = 0; in so - destin_Miller commented on October 8th 19 at 02:47
Ok I will try this - Eulalia22 commented on October 8th 19 at 02:50
messed up email and phone :) - anais_Littel34 commented on October 8th 19 at 02:53
October 8th 19 at 02:40
UPDATE tablename SET notify="email" WHERE notify=""
how does it correlate with
That is, if the user selected sms, the phone should be sms,phone,email, - anais_Littel34 commented on October 8th 19 at 02:43

Find more questions by tags MySQL