Thank you all for your help so far. Here is some more info that make this stranger.
- echo UPDATE shows everything looks fine. The variable is correct.
- There are no spaces in the variable. The case is all lower as it should be
Okay, this will separate the men from the boys....
When I run the update the FIRST time it works. If I change the SET portion and rerun the UPDATE that too works. So for example the following will all work no matter how many time I try it or changes that I make:
UPDATE members SET member_group_id = '1' WHERE name = '$cUsername'";
UPDATE members SET member_group_id = '32' WHERE name = '$cUsername'";
UPDATE members SET member_group_id = '23' WHERE name = '$cUsername'";
UPDATE members SET member_group_id = '4' WHERE name = '$cUsername'";
So it sounds like there was never any problem, right? Wrong!
In my testing I found that when I go to the table directly in myphpadmin and manually adjust the 'member_group_id' to a different number and THEN try the UPDATE it no longer works! Doesn't matter if I change the SET numbers. It is stuck and will not respond to the UPDATE script.
I am not 100% sure about the following, but I believe I walk away for a few hours and come back and all seems fine again (until I reset the table manually). I say I am not sure because I wasn't aware of doing it before, but not I am making a note of it.
Something is screwing things up when I manually adjust the member_group_id directly in the table. It stops the script from working!!!
Thank you all and Happy New Year!!!!