![]() |
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? |
You will need to use a while loop:
PHP Code:
|
Quick response, thanks for that Assassingod, i will try it straight away!
|
No problem.
|
Works like a charm (not that i doubted :D) Thanks so much assassingod ;)
|
Quote:
|
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 |
Why use 2 templates instead of one? (Unless i've missed something)
|
I changed it to use one..now code is as follows
PHP Code:
Code:
<td class="alt1" width="50%"]>$ip_from</td> Code:
$stylevar[htmldoctype] |
any ideas Assassingod
|
All times are GMT. The time now is 07:19 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:
|