|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I recently downloaded the code for the paging class from:
http://www.devarticles.com/art/1/110/6 The code isn't half bad, and it appears to work - however there is one problem - it doesn't page at all. I haven't changed the code at all (except where I need to connect to the database) - the table I am trying to page has well over 100 records in it - but Joe O' Donnell's paging class always returns the first 10 records. I was hoping to adapt the paging code so that I can do ordering on a row with more advanced features. I hope that someone can help on this subject. Thanks. |
|
#2
|
|||
|
|||
|
Your symptoms indicate that recnav's ShowRecs() function isn't receiving a value for $Page and it defaults to 1. How is the page number being passed in?
|
|
#3
|
|||
|
|||
|
Its the same way that O'Donnell
Its the same code as O'Donell's, I haven't changed anything - except the rows.
If someone has got this to work, any chance of posting it, that way I can compare what I'm doing wrong. |
|
#4
|
|||
|
|||
|
Instead of this:
PHP Code:
Try this: PHP Code:
|
|
#5
|
|||
|
|||
|
That didnt work
__________________
regards, Fulton |
|
#6
|
|||
|
|||
|
For what it's worth, I use a stripped-down version of that class, and it does work.
It's hard to guess what's wrong without seeing your code. Echo the value of $page before you call RecNav to see if it actually has a value. ...And show us some code... |
|
#7
|
|||
|
|||
|
i thought maybe it was case sensitive as on the index page they have:
PHP Code:
in the class.recnav.php is as follows: PHP Code:
i changed these but still didnt work. |
|
#8
|
|||
|
|||
|
The $Page variable in RecNav is local to that function only, so as long as it's consistent in there it will be fine.
Do you get any output from echo $page; when you insert that into your code? Does your next page link have a ?page=2 tacked on the end when seen in your browser? |
|
#9
|
|||
|
|||
|
Hi
Where the Next and Previous pages are supposed to be displayed on the webpage, all i can see is the word "Pages". I DON'T see "Previous | 1 | 2 | Next", which is what i thought i would see or at least something similiar. hope this cleaers up my last post. Last edited by DDDooGGG : July 20th, 2003 at 09:24 PM. |
|
#10
|
|||
|
|||
|
well, how come?
Come on now, you're not giving us very much to go on. |
|
#11
|
|||
|
|||
|
Sorry, been very busy
Sorry, I've been very busy over the past few days. Here is the code below: You will need to change the mysql bits as needed PHP Code:
PHP Code:
|