RE: [PHP] MySQL Current Row??

From: Date: Wed, 18 Sep 2002 14:33:59 +0000
Subject: RE: [PHP] MySQL Current Row??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116742@lists.php.net to get a copy of this message
In (most) SQL servers there is no concept of 'row number'. Most DA's design tables with a unique primary key. This can be used to identify the row form all of the other rows but it is not the same as a 'row number'. Since you are using PHP you can set a counter to 1 before your loop and then increment it at each loop. This will give you the semblance of a row number but be aware it is not the same. These are row numbers within the cursor you are looking at. If your cursor is a subset of the table's data then the numbers you are counting do not correspond to the data in the table. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -----Original Message----- From: Beeman [mailto:dharvell@dbh3.com] Sent: Wednesday, September 18, 2002 8:30 AM To: php Subject: [PHP] MySQL Current Row?? What function/array index should I use to determine the current row of a MySQL query when outputting using a do..while.. Loop?

« previous php.general (#116742) next »