Yes, thank you! However, I still don't know how a change in servers would corrupt the query code. Any ideas as to how?
Not sure however it's possible you copied an older version of the script during your switch so instead of a working script you got a broken one. The world may never know...