RE: [PHP] item number in a total or rows

From: Date: Fri, 16 May 2003 10:51:19 +0000
Subject: RE: [PHP] item number in a total or rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147872@lists.php.net to get a copy of this message
> say i have 86 db results in total , and i select an item which is 3rd in a > sequence how can i tell ? let me know thanks Well, how do YOU know it's the third item? Does it have a unique id like an auto_increment number? Is it's name unique? You have to pass something unique to the next page to identify that row. If the result is ordered in a certain way, you could always run the same query and use a LIMIT 3,1 at the end of it to get the third row. This only applies if there is an ORDER BY clause, though. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#147872) next »