List:General Discussion« Previous MessageNext Message »
From:Werner Stuerenburg Date:July 14 2001 8:49pm
Subject:Re: Loop an INSERT from form
View as plain text  
While loops are quite dangerous when the stop condition never
occurs. This is the case here. You must increment $i to get a
break condition to step out of the loop! Insert $i++; in your
code and you will be fine.

> This executes when submit is hit:
> $i = 1;
> while ($i <= $songsinalbum) {
>  $query = "INSERT INTO songs VALUES ('$id',
> '$songname','$rating','$video', '$album_id', '$movie')";
>    $result = mysql_db_query("movies", $query);
> };





-- 
Herzlich
Werner Stuerenburg            

_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de


Thread
Loop an INSERT from formDavid14 Jul
  • Re: Loop an INSERT from formWerner Stuerenburg14 Jul
  • RE: Loop an INSERT from formDon Read14 Jul
    • Re: Loop an INSERT from formDavid15 Jul
Re: Loop an INSERT from formDavid15 Jul