RE: [PHP] mysql question

From: Date: Mon, 08 Apr 2002 20:12:09 +0000
Subject: RE: [PHP] mysql question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92127@lists.php.net to get a copy of this message
Why don't you just increment a counter as you are retrieving them. mysql_select_db("some_DB") or die("DB not available"); $query = "select some_data from some_table"; $result = mysql_query($query); $rowcounter=0; while ($row=mysql_fetch_array($result)){ extract($row); $rowcounter++; echo("You are on Row $rowcounter wich contains the"); echo(" data $some_data for the field named some_data"); } James -----Original Message----- From: Julian [mailto:jsamfor@gmx.net] Sent: Monday, April 08, 2002 3:59 PM To: php-general@lists.php.net Subject: [PHP] mysql question Hi!!! I want to know if there is a function to know which is the number of the row that I selected. Please, help me! Julian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#92127) next »