Re: Counter Quandry

From: Date: Fri, 27 Oct 2000 10:53:34 +0000
Subject: Re: Counter Quandry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22315@lists.php.net to get a copy of this message
What about select count(*) from tblName; No real performance penalty, and it is resonably reliable. Unless there is an insertion of a row between the count and the display table algorithm in the scipt Regards George Patterson Maxim Maletsky wrote: > > you should first count them, > > so you connect to the database , make query SELECT (*) from ... and then > that will be the number of results found for your criteria, with the same > SQL then go wild pulling out the data and constructing tables.. > > Hope this helps, it's how I would do it .. > > Cheers! > > -----Original Message----- > From: Ben Ocean [mailto:lists@TheWebsons.com] > Sent: Friday, October 27, 2000 4:28 PM > To: php-general@lists.php.net > Subject: [PHP] Counter Quandry > > Hi; > The user selects criteria from a MySQL relational database. I create a page > on the fly with a table for each qualified selection. I have a counter that > increments after each table is created. I would like to use the final count > at the *beginning* of the page: before the program starts writing the > tables. How do I do that? > TIA, > BenO -- george@laopdr.com Network Administrator Planet Online Vientiane, Lao PDR

« previous php.general (#22315) next »