The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
i am attempting to build my first vb powered page via this tutorial: https://vborg.vbsupport.ru/showthread.php?t=62164
everything from that tut is working fine but i am running a query and cant seem to access the results in a template. basically this is what i have: PHP Code:
HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Title</td> </tr> <tr> <td class="alt1"> $get_thread_stats <br /> $most_threads <br /> $row[postusername] </td> </tr> </table> $footer </body> </html> any ideas how i can access my query results? thanks eric |
#2
|
|||
|
|||
![]()
If you are using a query_first (as opposed to simple "query") you don't need to fetch the rows afterwards, this is automatically done.
So just remove the while block and replace with: PHP Code:
|
#3
|
||||
|
||||
![]()
ok, thanks for heads up on the query_first thing. i thought that was a little weird.
i still couldnt get it to work without a while loop. heres what worked for me: PHP Code:
eric |
#4
|
|||
|
|||
![]()
Yes if you use "query" then you will need a loop to read the rows.
|
#5
|
||||
|
||||
![]()
cool, thanks for your help. im rolling now
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|