[thelist] MySQL toggle

Eduardo Dominguez lalo at teligens.com
Mon Feb 16 14:21:32 CST 2004


Something like this might work (?)

  update table set value = abs(value-1) ?

0 - 1 = -1 -> abs(-1) = 1
1 - 1 =  0 -> abs(0)  = 0


-- 
edmz | http://www.edmz.org



More information about the thelist mailing list