Help with construction of one update MySQL query
#1

Hey, I have two columns and I want always update only one of them (in case it is 0) so for example, when column A equals to zero, my value will be set only to column A else keep value at column A and update column B

UPDATE acc_mobile_messages (case when archived = 0 then SET archived = %i else SET archivedex = %i end

I've been trying something like this, but i'm sure that it's wrong, thanks.
Reply


Messages In This Thread
Help with construction of one update MySQL query - by Riwerry - 12.03.2018, 18:11
Re: Help with construction of one update MySQL query - by Maximun - 12.03.2018, 19:17
Re: Help with construction of one update MySQL query - by Riwerry - 12.03.2018, 22:22
Re: Help with construction of one update MySQL query - by mickmelon - 13.03.2018, 20:45

Forum Jump:


Users browsing this thread: 1 Guest(s)