RE: [PHP] PHP-mysql: affected rows

From: Date: Fri, 31 May 2002 12:56:56 +0000
Subject: RE: [PHP] PHP-mysql: affected rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100083@lists.php.net to get a copy of this message
No. Do one query with count(*), one with limit. If you're smart, you'll save the total amount in a session somewhere so you only have to do that query once, anyway. ---John Holmes... > -----Original Message----- > From: Victor Spång Arthursson [mailto:scooterbabe@mac.com] > Sent: Friday, May 31, 2002 8:16 AM > To: php-general@lists.php.net > Subject: [PHP] PHP-mysql: affected rows > > Hi! > > If I use the "LIMIT 0, 9" at the end of a SQL-query, mysql will only > return the first 9 records from the database... But to determine wether or > not to print out the "next page", I need to know the total number of > records matching the query... Is there a way of doing this without having > to do a new query with COUNT in it..? > > Sincerely > > Victor > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#100083) next »