WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
relationship query (1 post)

  1. aaron@rossano.com.au
    Member
    Posted 1 year ago #

    hi,

    I've got two objects, events and sessions.
    an event can have multiple sessions.

    I'd like to get all the events within a date range of today upto 14 days from today.
    The date range is a meta_key startDate / endDate in session.

    how am I best to retrieve the events?

    should I query all the sessions for the date range and then take all the IDs and query the events for relationship IDs?

    or can I get all the events and then when setting the relationship to the sessions can i add in a meta_query to filter out only sessions within the range? then only show events with sessions?

    how would i write the code for that?
    thanks in advance.

    http://wordpress.org/extend/plugins/posts-to-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by aaron@rossano.com.au
  • This topic is not resolved
  • WordPress version: 3.4.2