RE: Re: Finding current MySQL Row number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jake,

Yes, that would work however I have a rather large result set.  (2000+
records)

I think I'll probably just keep track of what row I'm on then.

Thanks for your help,

Scotty


-----Original Message-----
From: Jake Malone [mailto:jake@therussianjudge.com]
Sent: Monday, May 05, 2003 2:03 PM
To: php-db@lists.php.net
Subject:  Re: Finding current MySQL Row number


scotty,

i like to use for() to retrieve rows in a result set, which makes it really
easy to get the row number. example:

for ($i=0;$i<mysql_num_rows($result);$i++) {

    // Add 1, because the index $i starts at 0
    echo "Row: ".($i+1);

}


"Scott Teglasi" <steglasi@mediaglue.com> wrote in message
PCEMLDGDPKCPHDPMLKGDAEAICAAA.steglasi@mediaglue.com">news:PCEMLDGDPKCPHDPMLKGDAEAICAAA.steglasi@mediaglue.com...
> Hi all,
>
> I wanted to know if there's a function or some way of finding out what the
> current row that a mysql resultset is located on.
>
> Any help would be appreciated.
>
> Thanks!
>
> Scotty
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux