RE: [PHP-DB] Re: Finding current MySQL Row number

From: Date: Mon, 05 May 2003 18:21:26 +0000
Subject: RE: [PHP-DB] Re: Finding current MySQL Row number
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-27541@lists.php.net to get a copy of this message
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: [PHP-DB] 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 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

« previous php.db (#27541) next »