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,
asked October 8th 19 at 02:36
UPDATE table SET notify = anyone of parameters(',', myset, 'phone')
UPDATE tablename SET notify="email" WHERE notify=""
Find more questions by tags MySQL