Skip to content

Instantly share code, notes, and snippets.

@vibhasbhingarde
Created June 4, 2014 11:49
Show Gist options
  • Save vibhasbhingarde/381426065a3b3c275303 to your computer and use it in GitHub Desktop.
Save vibhasbhingarde/381426065a3b3c275303 to your computer and use it in GitHub Desktop.
Code to set 1 to 0 & vice versa via mysql query
mysql_query("Update awards set `active` = if(`active`=0,1,0) where `id`={$_GET['id']}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment