Glare
Hi, ich steh grad mal wieder auf dem Schlauch.
Ich möchte aus einer Tabelle die letzten 10 Einträge angezeigt bekommen. Nur bei mir wird immer einer angezeigt.
PHP
| php: |
1:
2:
3:
4:
5:
6:
7:
8:
|
$result = $db->query("SELECT title,gameid FROM bb".$n."_games ORDER BY gameid ASC LIMIT 0,10");
while ($row = $db->fetch_array($result)) {
$title = $row['title'];
$gameid = $row['gameid'];
eval("\$gamelistbit = \"".$tpl->get("gamelist_gamebit")."\";");
}
eval("\$tpl->output(\"".$tpl->get("gamelistall")."\");");
} |
|
gamelist_gamebit
| code: |
1:
2:
3:
4:
5:
6:
|
<tr align="left">
<td class="tablea"><span class="normalfont">Hioer kommt das Bild hin sofern vorhanden</span></td>
<td class="tablea"><span class="normalfont"><a href = "games.php?action=gameinfo&gameid=$gameid{$SID_ARG_2ND}">$title</a></span></td>
</tr>
|
|
gamelistall
| code: |
1:
2:
3:
4:
5:
6:
7:
|
[...]
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
$gamelistbit
</table>
[...]
|
|
Ich verstehe einfach nicht warum nur ein Eintrag angezeigt wird, obwohl in der DB mehr als 10 Einträge vorhanden sind.
Glare
Oh, na klar, sonst hängt er es ja nicht an.
Verdammt, warum habe ich das nur übersehen???
Herzlichen Dank