Hallo Leute. Ich versuche momentan Daten aus einer Datenbank auszulesen und in eine Tabelle zu schreiben. Das funktioniert soweit auch ganz gut, allerdings schreibt er beim 2. Durchlauf der Schleife nichtmehr in die Tabelle, sondern versetzt da drunter. Jemand eine Idee?
Hier mal der code:
Hier mal der code:
PHP-Code:
<?php
$abfrage = "SELECT * FROM qlocroots";
$ergebnis = mysql_query($abfrage);
echo '<ul id="main">';
echo ' <table class="table table-striped">';
echo ' <tr>';
echo ' <th>IP Adresse</th>';
echo ' <th>Produkt</th>';
echo ' <th>System</th>';
echo ' <th>KVM Port</th>';
echo ' <th>Funktion</th>';
echo ' <th>Webreset</th>';
echo ' <th>Frei</th>';
echo ' <th>Belegt</th>';
echo ' <th>Vergeben an</th>';
echo ' <th>Bezeichnung</th>';
echo ' <th>Form</th>';
echo ' </tr>';
while($row = mysql_fetch_object($ergebnis))
{
echo ' <tr>';
echo ' <td>' . $row->ip . '</td>';
echo ' <td>' . $row->produkt . '</td>';
echo ' <td>' . $row->system . '</td>';
echo ' <td>' . $row->kvmport . '</td>';
echo ' <td>' . $row->funktion . '</td>';
echo ' <td>' . $row->webreset . '</td>';
echo ' <td>' . $row->frei . '</td>';
echo ' <td>' . $row->belegt . '</td>';
echo ' <td>' . $row->vergebenan . '</td>';
echo ' <td>' . $row->bezeichnung . '</td>';
echo ' <td>' . $row->form . '</td>';
echo ' </tr>';
echo ' </table>';
echo ' </ul>';
}
?>

und pack folgendes auch aus der Schleife raus:
Kommentar