Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Feb 2010, 19:22
abdicar abdicar is offline
 
Join Date: Oct 2006
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!
Reply With Quote
  #2  
Old 05 Feb 2010, 19:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.

__________________
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.)
Reply With Quote
  #3  
Old 05 Feb 2010, 21:47
abdicar abdicar is offline
 
Join Date: Oct 2006
Yes, but i tried to search widgets here and i can't found any
Reply With Quote
  #4  
Old 05 Feb 2010, 22:26
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
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.



Originally Posted by abdicar View Post
Yes, but i tried to search widgets here and i can't found any
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.
Reply With Quote
  #5  
Old 05 Feb 2010, 22:51
abdicar abdicar is offline
 
Join Date: Oct 2006
Thank you for your reply guys. I just get it. Thank you and have a great weekend.... beer time!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:46.

Layout Options | Width: Wide Color: