The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Date manipulation in MySQL

Hi, I 've been trying to find a neat way of solving the following problem. I'm setting up a news section on a site, and I want to generate an archive menu as a list of months (and years), as a way of allowing users to view news items by month. In the database, my news items' dates are stored as unix timestamps. In my archive menu, I am generating the following url to filter by month and year, e.g news/may/2009. What I'm struggling to do at the moment is to take "May" and "2009" and retrieve all the items from the db which belong to this month and year. I've played about with this type of query, but can't get it quite right (the following isn't valid, but it hopefully demonstrates what i'm trying to do):