The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can i add a sql-query right into a function like
function show($userinfo) in online.php ? E.g.: *** $result=$DB_site->query_first("SELECT title FROM forum WHERE forumid=6"); should work, but brings up this error: *** Call to a member function on a non-object in .../vbulletin/online.php on line 58 It works if i add it outside of the functions, but doesn't inside of one. Any idea ? |
#2
|
||||
|
||||
Globalize $DB_site in the show() function.
But I wouldn't do this if I were you because you will basically execute that query every time the function is called, that is once per member online = lots of queries. |
#3
|
|||
|
|||
Thanks!
Yeah, you're right - and i just found a solution to not include this in a function ... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|