Jump to content

paging


searls03

Recommended Posts

so my database has a page number next to each field.  What I need to know how to do is make it so that the paging number, ie being able to select the page, if greater than one, will display 1-whatever the highest page number is.  does this make sense?  any help is appreciated. 

Link to comment
Share on other sites

Ok, I am using range, but how do I make it display as a link?  currently, nothing shows....

 <?php  $sql = ("SELECT MIN(page123) AS first, MAX(page123) AS last FROM products");
  $result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$page1=$row['first'];
$page2=$row['last'];

}  
foreach (range($page1, $page2) as $number) {
?>    <a href=."<?php $number; ?>".></a>
<?php
}
?>

Link to comment
Share on other sites

how would I also make the next/previous buttons, and also make it so that only 10 numbers will be displayed at a time, but no ".....#"  so like when it is on page 5, that is when the numbers will start moving so on page 5 it is 234567891011, 6 is 3456789101112. etc

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.