![]() |
SQL Query in profile tab
I made a plugin to add a new tab to a users profile, how would i make the data thats shown in the tab be from an executed MySQL Query?
PHP Code:
|
The DB object can be called inside the class using $this->registry->db.
|
Sorry i'm a php noob. A simple example using my code?
|
If you do not know PHP - I doubt any examples are going to help, dealing with SQL and the like is a bit further down the track. I would suggest you learn PHP as best you can before dealing with vBulletin.
|
You would put the query inside the function prepare_output. You would not put it in "$this->block_data['mymodification']" as that should contain the html to output. You would do the query as Hanson suggestion, then get the results and put it in the block_data.
|
Quote:
|
You would do something like this:
PHP Code:
|
Thanks, will try it out. I would +rep you only vb.org doesn't have rep :mad:
|
All times are GMT. The time now is 01:06 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:
|