DRJ
02-27-2006, 12:49 AM
I am trying to query the db for a value and have it displayed in the user/postbit section of a PM. I was able to do this for the Showthread, but not for PM.
I tried using this hook:
Hook Location : postbit_display_start
$kbcount = $db->query("SELECT *
FROM test_vba_kbentries
WHERE coder_id = $post[userid]
AND kb_approved = 1");
$post['kbentries'] = $db->num_rows($kbcount);
But I get this error:
Fatal error: Call to a member function on a non-object in /hsphere/local/home/vbaexpre/vbaexpress.com/forum/includes/class_postbit.php(251) : eval()'d code on line 14
Is $db not valid?
Thanks
I tried using this hook:
Hook Location : postbit_display_start
$kbcount = $db->query("SELECT *
FROM test_vba_kbentries
WHERE coder_id = $post[userid]
AND kb_approved = 1");
$post['kbentries'] = $db->num_rows($kbcount);
But I get this error:
Fatal error: Call to a member function on a non-object in /hsphere/local/home/vbaexpre/vbaexpress.com/forum/includes/class_postbit.php(251) : eval()'d code on line 14
Is $db not valid?
Thanks