Posted by Jerry Stuckle on 08/21/06 10:24
Ninad wrote:
> Petr Vileta wrote:
>
>>"Rik" <luiheidsgoeroe@hotmail.com> píše v diskusním pøíspìvku
>>news:c204d$44e083c0$8259c69c$13766@news1.tudelft.nl...
>>
>>
>>>Judging by your output:
>>>
>>>>Rows=3
>>>>1
>>>>2
>>>>3
>>>>Warning: mysql_fetch_array(): 5 is not a valid MySQL result resource
>>>>in F:\webpub\php\test.php on line ...
>>>>
>>>
>>>Do the 1\n2\n3 mean these rows are shown?
>>
>>Yes
>>
>>
>>>It would seem a _second_ fetch is performed on the result that we're
>>>not aware of.
>>
>>Hmm, I do to study my code :-) This could be the reason.
>>
>>
>>>Could you show us the entire relevant code?
>>
>>No. The code is not top-secret but is too big and if I delete some parts it
>>could be not runable.
>>
>>--
>>
>>Petr Vileta, Czech republic
>>(My server rejects all messages from Yahoo and Hotmail. Send me your mail
>>from another non-spammer site please.)
>
>
> Hi Petr
> what i want to say in my code is don't put mysql_fetch_array()
> funcstion in while loop condition put it inside the loop your problem
> will be solved
>
> Thanks
> Ninad
>
(Top posting fixed)
I almost always place mysql_fetch_array() in the while loop condition.
It works very well there.
P.S. Please don't top post.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|