48
That Error is occuring because its trying to access the database and i havent included the mainfile.php..
I cant include the mainfile.php.. if i do the file works when executed on it's own, but when included in a block it seems to cause errors..
maybe because mainfile.php is already loaded by the main page?
if i dont load mainfile.php, and include the file in a block, i get the same error as from the start.. call to non-member object.
any way around this?