Re: Web Page/MySql

From: Date: Tue, 13 Mar 2001 14:18:12 +0000
Subject: Re: Web Page/MySql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43679@lists.php.net to get a copy of this message
simple example <?php $database_db = 'bookmarks'; include_once('database_class.egn'); $HOW_MANY = 10; if (!isset($pos)) $pos = 0; $pos_prev = $pos - $HOW_MANY; $pos_next = $pos + $HOW_MANY; $product_count = $database->count('site', ''); $result = $database->select_array('', 'site', "LIMIT $pos, $HOW_MANY"); foreach($result as $pos => $val) echo $val['site_address'] ."<br>\n"; if ($pos_prev >= 0) echo " <a href='$PHP_SELF?pos=$pos_prev'>Back</a> "; echo " <a href='$PHP_SELF?pos=0'>Home</a> "; if ( $pos_next < $product_count ) echo " <a href='$PHP_SELF?pos=$pos_next'>Next</a> "; ?> ""Mike"" <mpeloso@princeton.edu> wrote in message news:98lff3$4ec$1@toye.p.sourceforge.net... I have a Mysql Database on a web site.On very large record retrieval I want to split the recorset so there is "Page 1, Page 2...."links at the bottom.This is the only part I dont have.Any Suggestions? Thank Mike P mpeloso@princeton.edu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43679) next »