![]() |
|
Thread Tools |
#1
|
|||
|
|||
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! No members have liked this post.
|
#2
|
||||
|
||||
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:
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#3
|
|||
|
|||
Yes, but i tried to search widgets here and i can't found any
![]() No members have liked this post.
|
#4
|
||||
|
||||
Actually you can just do what you would do in any function. Globalise $vbulletin, and use it in all database calls instead of $db ;
Your not looking very hard, there are plenty.
__________________
Former vBulletin.org Staff Member
Cable Forum Please do not PM me about custom work - I no longer undertake any. Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum. No members have liked this post.
|
#5
|
|||
|
|||
Thank you for your reply guys. I just get it. Thank you and have a great weekend.... beer time!
No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 09:30.