Need row number from database select
| From: | SP | Date: | Sun, 14 Apr 2002 09:44:14 +0000 |
| Subject: | Need row number from database select | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92917@lists.php.net to get a copy of this message | ||
If this is my database result from a select then I need to know that Bob is
the 1st result, Mike is the 2nd result and John is the 3rd result ...
Name Address
======== ===============
Bob 121 King St.
Mike 99 Main St.
John 8433 Albert St.
Does mysql keep track of this? I know I could just do a $i++ as I loop
through the results but I'm doing something recursively so the counter
doesn't work here.