Also ich habe folgenden Quelltext der mir eigendlich 20 Datensätze zeigen sollte, er zeigt aber nur einen an... Wer kann mir helfen?
PHP:
<? $sql = "SELECT * FROM bank_transaktionen WHERE `from` LIKE '$kto' OR `to` LIKE '$kto' ORDER BY `id` DESC LIMIT 0 , 20";
$result = mysql_query($sql);
$end = "";
while (!$end) {
$data = mysql_fetch_array($result);
$from = $data["from"];
$to = $data["to"];
$datum = $data["datum"];
$text = $data["text"];
$betrag = $data["betrag"];
$personn = $data["user"];
if (!$text) { $end = 1; }
else {
if ($to == $kto) {
$sql = "SELECT * FROM bank_konten WHERE ktonr LIKE '$from'";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
$fromktoname = $data["name"];
$sql = "SELECT * FROM bank_users WHERE id LIKE '$personn'";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
$person = $data["user"];?>
<tr><td><center>Von <? echo "$from - $fromktoname" ?><br><i><? echo $person ?></i></center></td>
<td><center><? echo $datum ?></center></td>
<td><center><? echo $text ?></center></td>
<td><center>+ <? echo $betrag ?> Rau</center></td></tr>
<? } if ($from == $kto) {
$sql = "SELECT * FROM bank_konten WHERE ktonr LIKE '$to'";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
$toktoname = $data["name"];
$sql = "SELECT * FROM bank_users WHERE id LIKE '$personn'";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
$person = $data["user"];?>
<tr><td><center>An <? echo "$to - $toktoname" ?><br><i><? echo $person ?></i></center></td>
<td><center><? echo $datum ?></center></td>
<td><center><? echo $text ?></center></td>
<td><center>- <? echo $betrag ?> Rau</center></td></tr>
<? } } } ?>