No it was outputting a completely diff string.
All I changed was basically this:
UPDATE blah, blah, blah, pwd = 'pwd', password = md5('pwd') blah, blah,
This gave me the odd output. Then I added a var and changed the query to include that var.
$pwd= 'pwd';
then query
UPDATE blah, blah, blah, SET pwd='$pwd', password=md5('$pwd') blah, blah,
and that worked.
As you can see, I was doing nothing extraordinary, I was just testing a couple of things before I made the changes to the live site.