If you show the errors, you'll see this error with that call:
Code:
Fatal error: Call to a member function fetch_array() on a non-object in /home/thetradersden/public_html/vb4_suite2/includes/class_postbit.php(321) : eval()'d code on line 39
The reason I suggested you actually look at the code where the hook is was so you could see what syntax was being used there. If you did, you'd see the proper syntax there is not $db, but instead $this->registry->db .