I'm trying to run db queries at the hook postbit_display_start, but for some reason it doesn't seem to work...
When I try this line:
Code:
$foobar = $db->query_read("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = 1");
...the code fails and showthread.php returns an empty page.
Ideas?
EDIT:
Nevermind, it seems it works when I use the "showthread_postbit_create" hook instead.
Now I need to figure out why I get "Resource id #x" instead of the data I'm looking for... *sigh*