It's a custom script or a script we're not familiar with. It could be a hundred things. We need a lot more code. Either link us to the script or post the file here. We need to know what $x is earlier in the script. Ideally we'd need to know what tables it's trying to connect to and if the tables and fields exist.
If it was vB or IPB fine as we have a copy of it but for this we need a lot more code to look at.