The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem with SQL query inside a php function
Hello everyone, I am trying to wrap a SQL query with a function to later pass as a variables into one of my templates. Whenever I run this simple query (for example to get the number of the contest) not wrapped as a function, it returns the value fine (which is 1). The following works perfect:
PHP Code:
PHP Code:
PHP Code:
Thanks for your time everyone. |
#2
|
|||
|
|||
I think maybe global.php doesn't work right when included inside a function. You could do this:
PHP Code:
|
#3
|
|||
|
|||
Quote:
--------------- Added [DATE]1312478868[/DATE] at [TIME]1312478868[/TIME] --------------- OK well almost works . It works but it displays the value at the top left corner of every page of that script... Any ideas why this would be happening? This the plugin I am using: PHP Code:
|
#4
|
||||
|
||||
Because you use echo. You can't use echo to output things in vB properly. You need to register the variable for template use.
|
#5
|
|||
|
|||
Quote:
PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|