Vaupell
02-23-2010, 09:46 AM
trying to run a single query in a forumblock, and refering to a old post Forum block stuff (http://www.vbulletin.com/forum/showthread.php?341171-Forum-block-how-do-i-get-a-vbulletin-gt-options-content-into-forum-blocks)
anyway trying to get this snippit to run but constantly getting function not found....
Code snippet AFTER reading This post (https://vborg.vbsupport.ru/archive/index.php/t-103032.html)from 2005
$getclasslist = $this->registry->query("SELECT * FROM ".TABLE_PREFIX."egr");
while($row= $this->registry->db->fetch_array($getclasslist))
{
My own code
$getclasslist = $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."egr");
while($row= $vbulletin->db->fetch_array($getclasslist))
{
Both give excaktly same error :
Fatal error: Call to undefined method vB_Registry::query() in C:\xampp\xampp\htdocs\emod\includes\block\html.php (95) : eval()'d code on line 25
Why ?
--------------- Added 1266926028 at 1266926028 ---------------
SOLVED : works now -->
$getclasslist = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."egr");
while($row = $vbulletin->db->fetch_array($getclasslist))
anyway trying to get this snippit to run but constantly getting function not found....
Code snippet AFTER reading This post (https://vborg.vbsupport.ru/archive/index.php/t-103032.html)from 2005
$getclasslist = $this->registry->query("SELECT * FROM ".TABLE_PREFIX."egr");
while($row= $this->registry->db->fetch_array($getclasslist))
{
My own code
$getclasslist = $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."egr");
while($row= $vbulletin->db->fetch_array($getclasslist))
{
Both give excaktly same error :
Fatal error: Call to undefined method vB_Registry::query() in C:\xampp\xampp\htdocs\emod\includes\block\html.php (95) : eval()'d code on line 25
Why ?
--------------- Added 1266926028 at 1266926028 ---------------
SOLVED : works now -->
$getclasslist = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."egr");
while($row = $vbulletin->db->fetch_array($getclasslist))