marklarah Posted April 15, 2008 Share Posted April 15, 2008 Is there anyway through a mysql update to switch a Bool field to the opposite without having to do a select first? Link to comment https://forums.phpfreaks.com/topic/101263-solved-boolean/ Share on other sites More sharing options...
Barand Posted April 15, 2008 Share Posted April 15, 2008 SET mybool = IF(mybool=1, 0, 1) SET mybool = IF(mybool='Y', 'N', 'Y') or whatever values you are switching between Link to comment https://forums.phpfreaks.com/topic/101263-solved-boolean/#findComment-517986 Share on other sites More sharing options...
marklarah Posted April 16, 2008 Author Share Posted April 16, 2008 *slaps head* forgot about if.... *slaps head repeatedly* *hangs head in shame and sulks away* </third person> Link to comment https://forums.phpfreaks.com/topic/101263-solved-boolean/#findComment-518256 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.