The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I am making a plugin and just wondered, what should I use to call data from the database? i.e. what should replace mysql_query() and mysql_result()
Thanks |
|
#2
|
||||
|
||||
|
This page from the manual should help - SQL Query Syntax
|
|
#3
|
|||
|
|||
|
Okay a few questions. I have been using similar things but I get this error:
Quote:
And how can I do mysql_result? |
|
#4
|
||||
|
||||
|
query_first means you don't have to do a fetch_array after doing the query - it is for when you only expect one row from your query.
Take a look at the vbulletin code in your files. There are lots and lots of examples in there. Your error is most likely from a plugin. Look at line 265 in class_postbit. My guess is it is a hook and thus you have an error in a plugin that uses that hook location. |
|
#5
|
||||
|
||||
|
Inside vBulletin classes, you must access the vBulletin registry object (which contains the database object) via
PHP Code:
PHP Code:
|
|
#6
|
|||
|
|||
|
Perfect
![]() And, I seem to be using $vbulletin ..... instead of $this
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|