MyBB Community Forums

Full Version: Query on Postbit?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What I want to do is add to the postbit. Part of this is executing a SQL query. I know that if I just run a query on the postbit hook, it'll eat resources, so I need to find out how to query the server once and reuse that information. I've read up on it, though the article I read seemed as if it wasn't querying to my needs (and I couldn't identify how to change it).

So, how can I (efficiently) query the server in the postbit hook?
Try reading the following post:

The point is to query all the necessary information in the first run of the plugin and save it in a static variable (which keeps its data through the postbit hook loop).

May this be useful too, not sure: