phpbar.de logo

Mailinglisten-Archive

AW: [php] db-ergebnis sortieren

AW: [php] db-ergebnis sortieren

Kilian Hann php_(at)_phpcenter.de
Tue, 8 Oct 2002 12:47:12 +0200


>> <select name="input[]"><option value="">Bitte wählen</option>
>>
>> <?php
>> $result = mysql_query("Select * FROM event_category", $conn);
>>
>> while ($category = mysql_fetch_row($result)) {
>>         echo "\t<option value=\"$category[0]\" ";
>>         if ($input[0] == $category[0]) echo "SELECTED";
>>         echo ">$category[1]</option>\n";
>> }
>>
>> ?>
>> </select>

Wie wärs mit "select * from bla order by spalte1" ?

kilian


php::bar PHP Wiki   -   Listenarchive