I am having my own CMS for my blog-posts. I am using a database which consists of five columns named, 1: id(primary key), title, body, date, author.
What I want to do is to create ARCHIVES for my blog, tell me how to create it using php and mysql?
I am concerned to create a archive like it is used to be on wordpress website pages, I mean i can summaries the posts by date, month and year, which will count the number of posts on particular date. When any user clicks on that date by going in the Archives section, he must be shown all the posts made on that day.
The archives you’re asking for are just queries to your database to find posts in a specific date range. For example all posts of a specific day, week, month or year. E.g.:
In SQL to find out if a specific date
MONTH(date)valueYEAR(date)valueThere is much more you can compare date/time values in SQL, this should give you enough to play around with it on your own.