![]() |
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 ? |
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. :) |
Thanks!
Yeah, you're right - and i just found a solution to not include this in a function ... |
All times are GMT. The time now is 11:05 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:
|