![]() |
Display database information
I have the SQL query
PHP Code:
|
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.
|
Thanks for the reply.
I've added PHP Code:
|
All you've done there is get the pointer. You then need to actually access the data like so:
PHP Code:
|
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.
|
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''
|
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']
|
All times are GMT. The time now is 05:04 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:
|