Re: missing array element



On 29 May 2005 13:41:38 -0700, david.g.robinson@xxxxxxxxxxxxxxxx wrote:
> I don't really understand why taking that line out solves the problem

It's because there are three rows in the result set, and you retrieved
the first one with that line. The "result set pointer" moves one row
ahead with that action, and consequently in the while loop you only have
two rows left. Count how many times you called mysql_fetch_assoc(): once
in the line now removed and twice in the while loop.


--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
.



Relevant Pages

  • Re: Delete rows
    ... Looping twice in that case would take twice as long. ... > Loop While Not c Is Nothing ... > HTH ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Re: Simple While statement
    ... The while loop will continue until the entire expression evaluates to ... which will happen in this case when xpos = 5. ... defined twice) the code ran as I would have expected. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)