The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Another one..
Here is another one that has me half-stumped!
In vbulletin, especially, when i do custom queries, i usually get multiple rows of results.. Rather like this little snippet.. PHP Code:
for instance, in that peice of code i want to display the usernames as follows in a template.. Username1 Username2 Username3 Username4 so in the template i put in this.. <table><td><strong>$username</strong></td></table> Yet this will only display one username, not all 4 as i want it to appear..any ideas on how to print all 4? |
#2
|
||||
|
||||
You will need to use a while loop:
PHP Code:
|
#3
|
||||
|
||||
Quick response, thanks for that Assassingod, i will try it straight away!
|
#4
|
||||
|
||||
No problem.
|
#5
|
||||
|
||||
Works like a charm (not that i doubted ) Thanks so much assassingod
|
#6
|
||||
|
||||
Quote:
|
#7
|
||||
|
||||
Ok, heres another one that hinged on that problem...i thought that the above would have sorted it out..but it didnt
I have the IP-to-country database.. i have a page with a country-dropdown box..pick a country in the box, and it displays the country's IP ranges..I am using an echo statement to show the ranges at the top of the page to verify.. PHP Code:
Code:
$ip_to Yet when i run the code, it only displays the last IP-Range..rather like the first query only displayed the last username..the echo statement however displays all ranges as its supposed to" Any ideas? I posted in Mod help too & bumped a few times, but nobody answered |
#8
|
||||
|
||||
Why use 2 templates instead of one? (Unless i've missed something)
|
#9
|
||||
|
||||
I changed it to use one..now code is as follows
PHP Code:
Code:
<td class="alt1" width="50%"]>$ip_from</td> <td class="alt2" width="50%">$ip_to</td> Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <!-- no cache headers --> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> <meta http-equiv="Cache-Control" content="no-cache" /> <!-- end no cache headers --> <title>Country Results Page</title> $headinclude </head> <body> $header $navbar <!-- main --><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td align="center" class="tcat"> IP Ranges For <i><u>$country</i></u></td> </tr> </table> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <thead> <tr align="center"> <td class="thead" width="50%" align="center">Range Start </td> <td class="thead" width="50%">Range End </td> </tr> </thead> <tr align="center"> $range_results </tr> </table> <!-- /main --> $footer </body> </html> |
#10
|
||||
|
||||
any ideas Assassingod
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|