Jump to content

Display MYSQL table data by month?


eddieblunt

Recommended Posts

Hi,

I've got an image gallery where users can login and upload images. When an images is published it updates the "published" column with the current Unix timestamp

 

I want to be able to display the images on an archive page to view the uploads by month

 

Any ideas on how i should do this?

 

Here's my query string:

 

$query = "SELECT id, picture, user, title, published".
         "FROM uploads".
         "WHERE published is not null ".
         "ORDER BY published DESC ". 
         "LIMIT $offset, $rowsPerPage";

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.