RE: [phpXperts] No Warping in results [1 Attachment]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guru,
 
Why do you want to show all page  numbers within the page. You can apply a
break and use like Prev and Next links after showing 10th link which is
similar to <Prev> 1,2,3,4,5,6,7, ...... <Next>, etc. There are many scripts
availabe on net on pagination functions. You can google on it.
 
Chaitanya.
 
 
--
Thanks,
Chaitanya.
 

  _____  

From: phpexperts@xxxxxxxxxxxxxxx [mailto:phpexperts@xxxxxxxxxxxxxxx] On
Behalf Of nagendra prasad
Sent: Thursday, July 22, 2010 8:14 PM
To: phpexperts@xxxxxxxxxxxxxxx; PHP DB; php-windows@xxxxxxxxxxxxx; php mysql
Subject: [phpXperts] No Warping in results [1 Attachment]


  
[Attachment(s) <>  from nagendra prasad included below] 

Hi All,

I have a code which will shows the mysql data in a page. When the data is
less its working fine however when the data is huge let say more then 10
thousand the page numbers are not warping. Its going beyond the page.  I
have attached the result page image as well.
Below is the code of page navigation.


****************************************************************************
*****************************************

<?php } ?>

<?php function showpagenav($page, $pagecount)
{
?>
<table class="bd" border="0" align="center" width=50% cellspacing="1"
cellpadding="4">
<tr WRAP>
<?php if ($page > 1) { ?>
<td><a href="index.php?page=<?php echo $page - 1
?>">&lt;&lt;&nbsp;Prev</a>&nbsp;</td>
<?php } ?>
<?php
  global $pagerange;

  if ($pagecount > 1) {

  if ($pagecount % $pagerange != 0) {
    $rangecount = intval($pagecount / $pagerange) + 1;
  }
  else {
    $rangecount = intval($pagecount / $pagerange);
  }
  for ($i = 1; $i < $rangecount + 1; $i++) {
    $startpage = (($i - 1) * $pagerange) + 1;
    $count = min($i * $pagerange, $pagecount);

    if ((($page >= $startpage) && ($page <= ($i * $pagerange)))) {
      for ($j = $startpage; $j < $count + 1; $j++) {
        if ($j == $page) {
?>
<td><b><?php echo $j ?></b></td>
<?php } else { ?>
<td><a href="index.php?page=<?php echo $j ?>"><?php echo $j ?></a></td>
<?php } } } else { ?>
<td><a href="index.php?page=<?php echo $startpage ?>"><?php echo $startpage
.."..." .$count ?><BR></a></td>
<?php } } } ?>
<?php if ($page < $pagecount) { ?>
<td>&nbsp;<a href="index.php?page=<?php echo $page + 1
?>">Next&nbsp;&gt;&gt;</a>&nbsp;<BR></td></BR>
<?php } ?>
</tr>
</table>
<?php } ?>

<?php function showrecnav($a, $recid, $count)
{
?>
<table class="bd" border="0" cellspacing="1" cellpadding="4">
<tr>

<?php if ($recid > 0) { ?>

<?php } if ($recid < $count - 1) { ?>

<?php } ?>
</tr>
</table>
<hr size="1" noshade>
<?php } ?>

**********************************************

Please help me with this.

Best,
Guru.


__._,_.___
Attachment(s) from nagendra prasad

1 of 1 Photo(s) 

 
<http://groups.yahoo.com/group/phpexperts/attachments/folder/692554198/item/
17124914/view> result page.jpg
result
<http://groups.yahoo.com/group/phpexperts/attachments/folder/692554198/item/
17124914/view> page.jpg
Reply to  <mailto:nagendra802000@xxxxxxxxx?subject=No Warping in results>
sender | Reply to  <mailto:phpexperts@xxxxxxxxxxxxxxx?subject=No Warping in
results> group | Reply
<http://groups.yahoo.com/group/phpexperts/post;_ylc=X3oDMTJyYWF2b2hvBF9TAzk3
MzU5NzE0BGdycElkAzEzODc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARtc2dJZAMxMzczNQRzZWMD
ZnRyBHNsawNycGx5BHN0aW1lAzEyNzk4MTM2MTM-?act=reply&messageNum=13735> via web
post | Start
<http://groups.yahoo.com/group/phpexperts/post;_ylc=X3oDMTJmMnA0ZnM1BF9TAzk3
MzU5NzE0BGdycElkAzEzODc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDZnRyBHNsawNudHBj
BHN0aW1lAzEyNzk4MTM2MTM-> a New Topic 
Messages
<http://groups.yahoo.com/group/phpexperts/message/13735;_ylc=X3oDMTM3YjVwczJ
0BF9TAzk3MzU5NzE0BGdycElkAzEzODc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARtc2dJZAMxMzc
zNQRzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzEyNzk4MTM2MTMEdHBjSWQDMTM3MzU-> in this
topic (1) 
Recent Activity: 

*	New
<http://groups.yahoo.com/group/phpexperts/members;_ylc=X3oDMTJncnRkN25pBF9TA
zk3MzU5NzE0BGdycElkAzEzODc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDdnRsBHNsawN2b
WJycwRzdGltZQMxMjc5ODEzNjEz?o=6> Members 2 

Visit
<http://groups.yahoo.com/group/phpexperts;_ylc=X3oDMTJmdDhjbmRnBF9TAzk3MzU5N
zE0BGdycElkAzEzODc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDdnRsBHNsawN2Z2hwBHN0a
W1lAzEyNzk4MTM2MTM-> Your Group 
Visit phpXperts website at www.phpxperts.net 
MARKETPLACE

Stay
<http://us.ard.yahoo.com/SIG=15op7n7nt/M=493064.13983314.14041046.13298430/D
=groups/S=1705006764:MKP1/Y=YAHOO/EXP=1279820814/L=5a480dea-95a8-11df-a5ee-e
ff6624bf90c/B=LTh5AmKImiI-/J=1279813614619203/K=f7T7XCPBVioM6wGkNaT5Vw/A=606
0255/R=0/SIG=1194m4keh/*http://us.toolbar.yahoo.com/?.cpdl=grpj> on top of
your group activity without leaving the page you're on - Get the Yahoo!
Toolbar now.

 
  _____  


Get
<http://us.ard.yahoo.com/SIG=15osa2cre/M=493064.13814537.14041040.10835568/D
=groups/S=1705006764:MKP1/Y=YAHOO/EXP=1279820814/L=5a480dea-95a8-11df-a5ee-e
ff6624bf90c/B=Ljh5AmKImiI-/J=1279813614619203/K=f7T7XCPBVioM6wGkNaT5Vw/A=607
8812/R=0/SIG=114ae4ln1/*http://dogandcatanswers.yahoo.com/> great advice
about dogs and cats. Visit the Dog & Cat Answers Center.

 
  _____  


Hobbies
<http://us.ard.yahoo.com/SIG=15oov27l9/M=493064.14012770.13963757.13298430/D
=groups/S=1705006764:MKP1/Y=YAHOO/EXP=1279820814/L=5a480dea-95a8-11df-a5ee-e
ff6624bf90c/B=Lzh5AmKImiI-/J=1279813614619203/K=f7T7XCPBVioM6wGkNaT5Vw/A=601
5306/R=0/SIG=11vlkvigg/*http://advision.webevents.yahoo.com/hobbiesandactivi
tieszone/> & Activities Zone: Find others who share your passions! Explore
new interests.

 
 
<http://groups.yahoo.com/;_ylc=X3oDMTJlZjdhaXU2BF9TAzk3NDc2NTkwBGdycElkAzEzO
Dc3MTg3BGdycHNwSWQDMTcwNTAwNjc2NARzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTI3OTgxMzYxM
w--> Yahoo! Groups 
Switch to: Text-Only
<mailto:phpexperts-traditional@xxxxxxxxxxxxxxx?subject=Change Delivery
Format: Traditional> , Daily
<mailto:phpexperts-digest@xxxxxxxxxxxxxxx?subject=Email Delivery: Digest>
Digest . Unsubscribe
<mailto:phpexperts-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>  . Terms
of Use <http://docs.yahoo.com/info/terms/> 
..
 
<http://geo.yahoo.com/serv?s=97359714/grpId=13877187/grpspId=1705006764/msgI
d=13735/stime=1279813613/nc1=6083913/nc2=4507179/nc3=3848642> 

__,_._,___


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5152 (20100528) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux