On Tue, 18 Sep 2001 20:56, Niklas Lampén wrote:
> How big difference does it make in speed in these:
>
> <?
> for ($i = 0; $i < mysql_num_rows($Results); $i++) {
>     blah
> };
> ?>
>
> or
>
> <?
> $n = mysql_num_rows($Results);
> for ($i = 0; $i < $n; $i++) {
>     blah
> };
> ?>
>
> So actually I'm asking how much more/less it takes time to do the
> comparing against mysql_num_rows() insted of comparing against a
> variable.
>
>
> Niklas

Will deppend on the environment in which you are running it. to test it 
on your environment, try running each say ten thousand times in a loop, 
and use a timer like microtime to check how long it takes.\

Then you can let us all know the answer.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   Why can't we just spell it orderves?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to