Guten tag,
Ich bringe es nicht zustande die Tabelle nicht zusortieren könnte mir wer helfen.
Der Script hab ich selber zusammen gestellt funktionieren tut er.
Ich bringe es nicht zustande die Tabelle nicht zusortieren könnte mir wer helfen.
PHP-Code:
<?php
require_once ('verbindung.php');
$db_link = mysql_connect (MYSQL_HOST, MYSQL_BENUTZER, MYSQL_KENNWORT);
// Nutzen von Datenbank (Name ist hinterlegt in Konstante MYSQL_DATENBANK
$db_sel = mysql_select_db( MYSQL_DATENBANK )
or die("Auswahl der Datenbank fehlgeschlagen");
$sql = "
SELECT link, name, rasse, lvl, klasse, rang, beruf1, beruf2, twink FROM mitglieder
";
$db_erg = mysql_query( $sql );
if ( ! $db_erg )
{
die('Ungültige Abfrage: ' . mysql_error());
}
echo '<table>';
echo '<tr>';
echo '';
echo '</tr>';
echo "<tr>";
echo "<td><a><u>Name</u></a></td>";
echo "<td><a><u>Rasse</u></a></td>";
echo "<td><a><u>Stufe</u></a></td>";
echo "<td><a><u>Klasse</u></a></td>";
echo "<td><a><u>Rang</u></a></td>";
echo "<td><a><u>Beruf 1</u></a></td>";
echo "<td><a><u>Beruf 2</u></a></td>";
echo "<td><a><u>Twink von</u></a></td>";
echo "</tr>";
echo "<tr height='5'></tr>";
while ($row = mysql_fetch_array($db_erg, MYSQL_ASSOC))
{
echo "<tr>";
echo "<td><a>". $row['name'] ."</a></td>";
echo "<td><a>". $row['rasse'] . "</a></td>";
echo "<td><a>". $row['lvl'] . "</a></td>";
echo "<td><a>". $row['klasse'] . "</a></td>";
echo "<td><a>". $row['rang'] . "</a></td>";
echo "<td><a>". $row['beruf1'] . "</a></td>";
echo "<td><a>". $row['beruf2'] . "</a></td>";
echo "<td><a>". $row['twink'] . "</a></td>";
echo "</tr>";
echo "<tr height='3'></tr>";
}
echo "</table>";
mysql_free_result( $db_erg );
?>

Kommentar