WordPress.org

Ready to get started?Download WordPress

Forums

Get most popular tags from certain time period (last 24 hours) (1 post)

  1. transient jet lag
    Member
    Posted 4 years ago #

    Okay so I want to know if there's a SQL query that could get the most popular tags from the last 24 hours. I created a function that does it by doing a query on post from the last 24 hours and then doing loops that add and sort the tags. But something tells me I could probably do this with a really advance query.

    I'm trying to take a stab on it but I'm not good at advanced queries like this.

    Right now I know that a condition would be "post_date > date('Y-m-d H:i:s', strtotime('-24 hours'))" I'd also have to order it so maybe select "count(terms.term_id) as the_count" and then order it by "ORDER BY the_count DESC" But I'm not sure if it's possible to do a query / join with the way the terms tables are set up.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by transient jet lag
  • This topic is not resolved
  • WordPress version: 2.9

Tags

No tags yet.