The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Display database information
I have the SQL query
PHP Code:
|
#2
|
||||
|
||||
Try looking in any vbulletin php file. This sort of thing is done all the time. Just take a look at the index.php file and how forumusers are defined, or the search.php file and how threads or posts are defined.
|
#3
|
|||
|
|||
Thanks for the reply.
I've added PHP Code:
|
#4
|
||||
|
||||
All you've done there is get the pointer. You then need to actually access the data like so:
PHP Code:
|
#5
|
|||
|
|||
Also change that from $db->query_read_slave to $db->query_read, you only use query_read_slave when you have more than 1 query running together.
|
#6
|
|||
|
|||
I'm really sorry, I've been working on this for a while now and really confused by what you mean when you say ''All you've done there is get the pointer. You then need to actually access the data like so''
|
#7
|
||||
|
||||
I showed you an example. Doing a select just finds the data (gets a pointer to it), then you need to actually fetch it for use with the fetch_array statement. vB does have a shortcut if you are only fetching one line, and that is instead of saying query_read (or query_read_slave), to just say query_first. If you use that, then you do not have to fetch the data afterwards. It would be available in the array you assigned it to - so $mileage2010['username']
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|