My money is on Dave getting this one out first. Josh way write up some better documentation.
This is one of those hacks that should be a feature of threads and isn't however in the future we shall see. Like Josh said Dave has a better way to do this with less queries.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.