OK - Success !! Changing each of the queries did actually work - it was just that my page was cached

.
So basically, the only thing you need to make people aware of is if they have a different photopost prefix option set (when they installed - see Photopost Config options: PhotoPost Database Prefix (cannot be changed)), then they need to alter each of the lines of code where the SQL statements are, to include the prefix of their photopost database tables as shown in my example above. I'd actually put the code changes here, but it would breach copyright

.
Of course, if someone can find out what the variable is for this config option in Photopost, then the variable could be setup in the thumbincluder file

.
Anyway, thx to PixelFX and Mickie D for trying to help with this one. If anything it made me actually go through the thumbincluder file line by line until I actually found the problem

.