Tuesday, 3 September 2013

phpMyadmin | mysql | PHP Command help for flipping values of 171 tables

phpMyadmin | mysql | PHP Command help for flipping values of 171 tables

So this might be a really stupid question and I am sure that I already
know the answer. I am fixing some "hack job" coding and database work that
he did for a client. Its a mySQL Database in phpMyadmin and he set all the
active/inactive values to 0/-1 and in his coding made active=1 and
inactive =0 ..... I am wondering if there is a sql command I can execute
in either workbench or phpmyadmin to flip all the 0's to 1 and -1 to 0 in
a few short strokes over 171 tables or if its a table by table fix.
Like I said I am sure the answer is in my head, but I am so over the top
frustrated with the amount of "wrong" in this dudes work that I'm kinda
now on auto pilot and the creativity thought process has stopped for a
bit, haha.
Thanks for the help ahead of time.

No comments:

Post a Comment