This is a discussion on "Monthly Archives using PHP/MySQL?" within the PHP Forum section. This forum, and the thread "Monthly Archives using PHP/MySQL? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Monthly Archives using PHP/MySQL?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Monthly Archives using PHP/MySQL?
In a similar way to WP, I would like to display archives by monthly. Each post has a date in the form yyyy-mm-dd. I figured for each month it would be something like this for Jan:
Is it possible? It must be, because I've seen it done on WordPress Thanks, Jack
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
Something like this: (untested...)
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
Thanks c010!
I'll test it and report any errors I might find.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
That code would work on the actual page archive.php.
But I need code that will list the months in the sidebar that have posts in. Can that be done? Also - is the Month in your code Number(1-12) or name?
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
Code did not work
Just get a blank page. It's as if it is working, but not using month=1.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
I managed to get them to display on the page using this code:
Phew! Ok, I have a way of doing it, but there must be an easier way, because this is almost ridiculous!
But there is so much code! Surely there is an easier way?
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
Last edited by Jack Franklin; Jan 12th, 2008 at 19:42. |
|
|||
|
Re: Monthly Archives using PHP/MySQL?
try adapting this code.
|
|
||||
|
Re: Monthly Archives using PHP/MySQL?
You mean use that code instead of my tremendously long code?
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|||
|
Re: Monthly Archives using PHP/MySQL?
yes
But as i said before im no expert |
|
||||
|
Re: Monthly Archives using PHP/MySQL?
Hey, I get the drop down, but nothing happens when I click on them. Would I need to use javascript?
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pay monthly hosting | bhurruth | Hosting & Domains | 10 | Sep 25th, 2007 17:44 |
| Mysql/php | marie2007 | PHP Forum | 7 | Jul 10th, 2007 13:20 |
| Using PHP/MYSQL on Mac OSX | jonnymorris | Starting Out | 0 | Jul 5th, 2007 14:55 |
| Palace Archives | thepalace1 | Free Web Site Critique | 0 | Apr 4th, 2007 17:20 |