• Hi,

    scenario: I am building a photoblog for a friend based of a free photoblog template but changed considerably, I have thumbnails of posts lining up in rows as a kind of thumbnail gallery, the list of posts is retrieved by an sql query within a function, howeever looking at the query i think it is always going to show the most recent posts, ive set it to display 35 posts, even if someone is looking at an older post.

    what i am looking for is a way to make the thumbnail list disply the posts that were made nearest to the currently viewed post. so if someone is looking at a recent post, the see all the most recent posts, but if someone had gone into the archives and is viewing a post from july last year, the thumbnail list actually shows all the other posts from the period.

    I thought about filtering the query by month, but I do not want it to be neccesary to update a certain amount of photos every month for the full thumbnail gallery to display, for that is software dictating to a user which is poor.

    does anyone have an idea how to acheive this? I am not married to the sql function method for displaying this thumbnail list, so if someone knows a better way I am definately open and grateful

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Dynamically select recent posts using sql query’ is closed to new replies.