View Full Version : Query in postbit
rogersnm
08-25-2006, 11:40 AM
I am trying to make a query inisde ta plugin with the location: postbit_display_complete but when i put $db->query_read or $vbulletin->db->query_read then you get: Fatal error: Call to a member function on a non-object in /home/vbnova/public_html/includes/class_postbit.php(296) : eval()'d code on line 20 Which plugin location should i use?
Guest190829
08-25-2006, 12:02 PM
It's in a class, so try:
$this->registry->db->
rogersnm
08-25-2006, 12:59 PM
now i have: $postuserid = $post['userid'];
$threadsmade = $this->registry->db->query_read("SELECT COUNT(*) AS threads FROM thread WHERE postuserid = '$postuserid'");
$post['threadsmade'] = $threadsmade['threads'];
echo $post['threadsmade'] . ", ";
And all i get is: ", , , , , ," Any ideas?
fabioski
08-15-2008, 11:40 AM
I have the same problem.
How can I query my DB in a postbit_display_complete location plug-in?
--------------- Added 1218810281 at 1218810281 ---------------
With:
$this->registry->db->query_read("
SELECT COUNT(*) AS numerolibri
FROM tab_mylib
WHERE myl_userid = '1'
");
$testo_libri .= "$this[numerolibri]";
I obtain this error:
Fatal error: Cannot use object of type vB_Postbit_Post as array in /var/www/web157/html/forum/includes/class_postbit.php(293) : eval()'d code on line 18
Marco van Herwaarden
08-16-2008, 10:40 AM
Try:$query_result = $this->registry->db->query_first("
SELECT COUNT(*) AS numerolibri
FROM tab_mylib
WHERE myl_userid = '1'
");
$testo_libri .= $query_result['numerolibri'];
fabioski
08-16-2008, 02:34 PM
Yeahhhh now it works!
I add some keywords for future searches:
query postbit
postbit plugin
query postbit_display_complete
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.