The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi.
What code is responsible for displaying all the records from the database / table Is there any other method than "echo" |
|
#2
|
||||
|
||||
|
Just use the SELECT query and use $row['(name of row here)'] in a table tag.
|
|
#3
|
|||
|
|||
|
what is wrong in that code ?
PHP Code:
|
|
#4
|
||||
|
||||
|
try a do ... while loop, instead of just a while loop
|
|
#5
|
|||
|
|||
|
what do u mean exactly ? could u change that for me please ?
|
|
#6
|
||||
|
||||
|
The do... while loop is below... not sure if it will help personally but this is how you do it.
PHP Code:
|
|
#7
|
|||
|
|||
|
still shows the last entry
i think the problem is here Code:
$sql = $db->query_read("SELECT * FROM `amx_screenshots` ORDER BY ssid DESC");
|
|
#8
|
||||
|
||||
|
Why don't you echo x; at some point so you can see how many rows there are supposed to be in the loop, that would help pinpoint the issue... if x=1 then the problem is with the sql, otherwise the sql is probably right,
|
|
#9
|
|||
|
|||
|
could u write an example code for templates ? what code should be there :>
|
|
#10
|
||||
|
||||
|
after your while loop just put the line:
echo "<h1>" . $x . "</h1>" ; That should output the value of x somewhere in a big font, just for debugging purposes, obviously don't run your forum this way. I don't know if $x is available in a template... just put: <h1>$x</h1> somewhere in the template and see if anything shows up. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|