Re: hard to explian

From: Date: Fri, 04 Aug 2000 14:52:19 +0000
Subject: Re: hard to explian
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10145@lists.php.net to get a copy of this message
> 1.. It counts how many rows in the databases, if there are 1000 > rows in the database. Determine row count from num_rows() for that database, assign it to a variable. > 2.. Then, the total number of rows which is 1000 then divided by 50 > which comes out a result of 20. Divide row variable by 50. Use the ceil() and or floor() to get the number of combo boxes you need. > 3.. Fianlly, this script will automatically assign twenty values > in a combo box such as "first 50's", "second 50's"....and till > the > "last 50's". Use the number of combo boxes in a for() statement to loop the right number of times. Then, inside that have another for loop counting the number of rows in each box. In both loops, you'll need to have an if statement evaluating if you've reached the end of the record set. Inside that if statement is a "break;" command which will pull you out of the loop. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#10145) next »