|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
google style next prev button
Hi all,
i want to know how to make next prev button like google with php and mysql .. thank's -- deff |
|
#2
|
|||
|
|||
|
with LIMIT.
look it up. |
|
#3
|
|||
|
|||
|
I think one of the devarticles team wrote an article on that somewhere. try looking in the php or mysql category. i remember reading the article, was fairly good.
basically you just use the LIMIT keyword as epyon said and filter the number of records displayed
__________________
i am cope. i drink coke. i am in hope.i am cope. i drink coke. i am in hope.i am cope. i drink coke. i am in hope. |
|
#4
|
|||
|
|||
|
we have a article on this very subject try, Building A Dynamic MySQL Paging Class With PHP
that should cover everything you need to know, if you still have any questions, please post them here, id be glad to help! |
|
#5
|
|||
|
|||
|
just to add to that last post, i just read that article, and it may be a bit advanced for your needs, if you would like i have made a simpler prev/next for my sites, that i could post for you if you would like, its just a few lines of code
|
|
#6
|
|||
|
|||
|
thank's before ben
![]() i'd love to, please post u're own script, and i'll learn ![]() -- deff |
|
#7
|
|||
|
|||
|
ok here it is
it comes in two parts PHP Code:
ok this part finds out how many pages we need, all you have to do is set the query and how many rows for each page. once you have that, you can place this next section of php anywhere, and it will generate the links for you. PHP Code:
hope this helps |
|
#8
|
|||
|
|||
|
Thank's Ben
![]() it's usefull .. -- deff |
|
#9
|
|||
|
|||
|
Building A Dynamic MySQL Paging Class With PHP
This article looks very good - unfortunately the support files are no longer available at the old link - anybody know where to go to get hold of the recnav class file and sample script?
|
|
#10
|
|||
|
|||
|
Hi all...
I've tried the code provided by Ben (thanks Ben) I have used them and it generated the page links very well.... however... only the first page worked... the others didn't. What I meant was: The MySQL query takes two arguments in the form of $prod_group and $order_by from two drop down list, where once it is submitted, the $prod_group and $order_by is used in this query: $result = mysql_query("SELECT * FROM products WHERE prod_group = '$prod_group' ORDER BY $order_by ASC", $link_id); So, when I used Ben's script, I do not know how to modify it so that when I click on the page links, it submitted this: productorder2.php?prod_group=GC&order_by=prod_brand&submit=Submit&start=2 rather than just this: productorder2.php?start=2 How do I achieve this? I'm sorry if I'm being unclear... but I've just started programming about a month ago.. Thank you very much in advance.. thanks.. |
|
#11
|
|||
|
|||
|
Hi ben,
i have tried your google style paging and it works to an extent. When i click page 2, it displays the same results listed on page 1, any ideas why this may be? thanks
__________________
regards, Fulton |
|
#12
|
|||
|
|||
|
Where in this code do i put my "while" loop?
|
|
#13
|
|||
|
|||
|
showing different stuff
Thanks very much, Ben, for this code. I spent all day yesterday with something much harder; it never worked. I got this going in about an hour.
I don't know if this is the best way to make it show different items, but the way I did it was to add to my query: "limit $start, $display_number" URL |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > google style next prev button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|