The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
help with query
can anyone help?
PHP Code:
Code:
Fatal error: Call to a member function on a non-object in /home/aussie7/public_html/encyclopedia.php on line 58 |
#2
|
||||
|
||||
$DB_site was for 3.0x series use $db for 3.5.x
Another reason is that you may need to put: global $DB_site; or global $db; above the code to make it accessible if it is in a function. HTH's |
#3
|
|||
|
|||
thanks, but neither worked, even with the globals.
|
#4
|
|||
|
|||
vB 3.0 or 3.5?
For 3.5 you could also try this: PHP Code:
|
#5
|
|||
|
|||
nah it didn't work either.
and version 3.5 below is a snippet of code, its going to be an encyclopedia that i'm going to share here. It was working on 3.0 and i'm rewriting it for 3.5 (now i have some spare time) and all the other scripts in my vb dir have $DB_site. PHP Code:
|
#6
|
||||
|
||||
change:
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
$db->query_read did the trick... thanks..
i can't log into the API, it keeps throwing errors, then takes ages to load... bit of a pitty. but thanks to everyone who helped |
#8
|
||||
|
||||
no problemo.
I would think about something like a table with the following fields: id, symbol, total then when someone edits or creates a new entry, take the first letter of the entry and update the above table accordingly. Then you can just dosomething like: PHP Code:
The other way is to then cache the above results in the datastore or in a file. Then you can avoid the query every page refresh (however, a query like that would be VERY minor). Good luck. |
#9
|
||||
|
||||
Quote:
wrong: $vbulletin->$db right: $vbulletin->db |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|