vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=235092

Call to a member function query_read() on a non-object in
by abdicar
05 Feb 2010 19:22

Hi there to everybody :)

I'm testing in the widgets to insert our custom php code in vb4.

I have this:

$results = $db->query_read("SELECT *
FROM user LIMIT 0 , 1);

And I got something like this:

Fatal error: Call to a member function query_read() on a non-object in /home/admin/domains/.../packages/vbcms/widget/execphp.php(171) : eval()'d code on line 2

Do you have any suggestion to connect from a widget with direct php exc to check the database?

thank you!

Lynne 05 Feb 2010 19:33

You really should take a look at some of the widgets already released here to see how they went about this. You need to make a query like so:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


abdicar 05 Feb 2010 21:47

Yes, but i tried to search widgets here and i can't found any :(

Paul M 05 Feb 2010 22:26

Actually you can just do what you would do in any function. Globalise $vbulletin, and use it in all database calls instead of $db ;



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Quote:

Originally Posted by abdicar (Post 1975597)
Yes, but i tried to search widgets here and i can't found any :(

Your not looking very hard, there are plenty.

abdicar 05 Feb 2010 22:51

Thank you for your reply guys. I just get it. Thank you and have a great weekend.... beer time!


All times are GMT. The time now is 09:18.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.