phpbar.de logo

Mailinglisten-Archive

[php] Schleife mag nicht

[php] Schleife mag nicht

Cyrill Schumacher webmasterbhs_(at)_bluewin.de
Wed, 16 Aug 2000 22:57:05 +0200


> So sollte es wohl ehr sein :
>
>  $query = "SELECT * FROM $table WHERE (id BETWEEN '100' AND '199')";
>     $result = mysql_query($query);
>     $row  =  mysql_fetch_row($result)      file://Ausgabe funktioniert
>
>
>     $min=100;                              file://Beginn Datensatz Nr.
>     $max=199;                              file://max. Datensatz Nr.
>     while ($row['id'] <= $max ){                  file://sollte ausgeben
solange

falsch, weil

mysql_fetch_array() is an extended version of mysql_fetch_row(). In addition
to storing the data in the numeric indices of the result array, it also
stores the data in associative indices, using the field names as keys.

kiri




php::bar PHP Wiki   -   Listenarchive