php pagination - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-22-2005, 08:31 PM   #1 (permalink)
que
Junior Member
 
Join Date: Aug 2005
Posts: 31
Default php pagination

Hello -

Well I have my database up and running and have it populated with plenty of data now. Currently I can only view all the records at once . I need help with a php pagination script to view the database like PREV 1,2,3 NEXT.

Anyone know where I can find a easily customizable script like this?

thanks
que is offline   Reply With Quote
Sponsored Links
Old 11-24-2005, 12:55 AM   #2 (permalink)
Member
 
Join Date: Sep 2005
Posts: 219
Default

try phpmyadmin
Where is your DB installed?
There should be some SQL admin software from your host.
cristobal is offline   Reply With Quote
Old 11-24-2005, 11:00 AM   #3 (permalink)
que
Junior Member
 
Join Date: Aug 2005
Posts: 31
Default

Thanks ~cristobal I know about phpmyadmin but I am building a script to display my data on my site.

Code:
<html> 
<head><title>My Page Title</title></head> 
<body> 
<?php 
$database="mydbname"; 
mysql_connect ("localhost", "myusername", "mypassword"); 
@mysql_select_db($database) or die( "Unable to select database"); 
$result = mysql_query( "SELECT * FROM mytable" ) 
or die("SELECT Error: ".mysql_error()); 
$num_rows = mysql_num_rows($result); 
print "There are $num_rows records.<P>"; 
print "<table width=400 border=1>\n"; 
while ($get_info = mysql_fetch_row($result)){ 
print "<tr>\n"; 
foreach ($get_info as $field) 
print "\t<td><font face=arial size=1/>$field</font></td>\n"; 
print "</tr>\n"; 
} 
print "</table>\n"; 
?> 
</body> 
</html>
This is what I have so far but I do not know how to add the PREV 1,2,3 NEXT part of it..
thanks
que is offline   Reply With Quote
Old 11-27-2005, 06:28 AM   #4 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 35
Default

well i know, in for jsp, there is a displaytag library, maybe you could search for something similar in here?
badshow_99 is offline   Reply With Quote
Old 02-16-2006, 02:34 AM   #5 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 2
Default Re: php pagination

PHP Pagination tutorial
pascalobispo is offline   Reply With Quote
Old 02-23-2006, 06:57 AM   #6 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 1
Lightbulb Re: php pagination

U could take a look at http://ionescuraul.users.phpclasses....ckage/2832.htm
raul is offline   Reply With Quote
Old 06-25-2010, 08:18 AM   #7 (permalink)
Junior Member
 
Join Date: Jun 2010
Posts: 20
Default Re: php pagination

Can anyone could give me any idea of where to find a good PHP Pagination Script?
alstonwillman is offline   Reply With Quote
Old 08-19-2010, 02:18 AM   #8 (permalink)
Junior Member
 
Join Date: Aug 2010
Posts: 23
Default Re: php pagination

Hi As we know that pagination concept we use for showing Record which we fetch From database. Actually here we used the concept, like that,

(1)first we know how much Record is placed in database.(suppose 100 Record in table1)
(2)Number of record which we want to show per page (suppose 20 Record Per Page)
(3)How many Page we need for getting that Record from Database ( i.e " 100/20 " =>5 ).

Now this is the basis concept, which we need.
sandy_j_sam is offline   Reply With Quote
Old 08-28-2010, 03:20 AM   #9 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 4
Thumbs up 新加的空白文章14

这是新加的空白文章14,可以在ubb可视化编辑器中,添加和修改文章内容。
jklm899 is offline   Reply With Quote
Old 08-30-2010, 06:43 AM   #10 (permalink)
Regular User
 
Join Date: Jul 2010
Posts: 55
Default Re: php pagination

You can get the pagination by using remainder logic. For example you want to to have 10 results on a single page, then take the mod of ten and tell the condition that if mod of ten becomes zero then switch to the next page.
__________________
Web Design Company
cyberdesignz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 11:36 AM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting