|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
listing last 15 days
Hello,
How can I make a navigation script to display the results of the last 15 days? I use this for my first page: PHP Code:
I want a script that create links like "index.php?page=2", so if you click on that link you will see the results between 15 days ago and 30 days ago. Sorry for my english, I hope you guys know what I mean. Thnx! |
|
#2
|
||||
|
||||
|
hi,
you can use mysql's date time function for getting appropriate results. $sql = "SELECT id,date,releasenr,title FROM gbadb WHERE date > date_sub(date,interval 16 days ) ORDER BY date DESC, releasenr DESC"; and to get a navigation like what you want, now i think you should get hind and should be able to code navigation like what you want. jd
__________________
_____________________________ d.k.jariwala (JD) ~ simple thought, simple act ~ I blog @ http://jdk.phpkid.org |
|
#3
|
|||
|
|||
|
I have found another solution:
PHP Code:
Only one problem the navigation script is making a "previous 15 days" link on the last page, there should be no link...someone can help? And is there another way for this? PHP Code:
This is not working: PHP Code:
Thnx |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > listing last 15 days |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|