vBulletin ModsThe Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=235092 |
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:
|
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 ;
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 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.