RE: [PHP] Prev/Next

From: Date: Mon, 16 Oct 2000 07:01:25 +0000
Subject: RE: [PHP] Prev/Next
Groups: php.general 
Request: Send a blank email to php-general+get-20307@lists.php.net to get a copy of this message
Maybe you are not looking in the right sites :) A simple chunk of code to take a SQL query and display the results xx per page. Also displays next, previous, and direct links to each page number. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1492 A template script to provide the ability to get the next or previous n records from a MySQL database. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=386 mysql php3 contain next previous buttons http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=334 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -----Original Message----- From: Website4S@aol.com [mailto:Website4S@aol.com] Sent: Monday, October 16, 2000 7:56 AM To: php-general@lists.php.net Subject: [PHP] Prev/Next Hi, I have been searching threads and web sites for help with setting a display limit and prev/next buttons but I am getting no where. The code I have found I can`t get to work :/ Does anyone on the list have any suggestions for adding a limit of 20 results per page and adding the prev/next buttons to the bottom for the following code ? <TABLE BORDER="1" WIDTH="2000"><tr><TH>Delete_User</TH></TR> <?php $host="localhost"; $user=""; $passwd=""; $dbase=""; $Selstmt = "SELECT * FROM Member order by Surname"; $dbh=mysql_connect($host, $user, $passwd); $query=mysql_db_query($dbase, $Selstmt); $num_rows=mysql_num_rows($query); for ($i=0; $i<$num_rows; $i++) { mysql_data_seek($query, $i); $array=mysql_fetch_array($query); printf("<tr><td>%s</td><td>%s</td></tr>", $array["Surname"]); } mysql_close(); ?> </TABLE> Thanks in advance for any help. Ade -- 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 (#20307) next »