![]() |
Records from database
Hi.
What code is responsible for displaying all the records from the database / table Is there any other method than "echo" |
Just use the SELECT query and use $row['(name of row here)'] in a table tag.
|
what is wrong in that code ?
PHP Code:
|
try a do ... while loop, instead of just a while loop
|
what do u mean exactly ? could u change that for me please ?
|
Quote:
PHP Code:
|
still shows the last entry
i think the problem is here Code:
$sql = $db->query_read("SELECT * FROM `amx_screenshots` ORDER BY ssid DESC"); |
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,
|
could u write an example code for templates ? what code should be there :>
|
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. |
All times are GMT. The time now is 06:50 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:
|