Ahh that would be why. I have a prefix on all my tables in vbulletin, so I had to add some code to the script to take this into account.
I added the prefix to this table thinking it was selecting something from vbulletin.
I’ll fix that and give it another go tonight. Thanks