![]() |
Call to a member function query_read() on a non-object in
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! |
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:
PHP Code:
|
Yes, but i tried to search widgets here and i can't found any :(
|
Actually you can just do what you would do in any function. Globalise $vbulletin, and use it in all database calls instead of $db ;
PHP Code:
Quote:
|
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 08:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|