1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fetch Options post_date using ranges

Discussion in 'XenForo Development Discussions' started by Brent W, Jan 27, 2015.

  1. Brent W

    Brent W Well-Known Member

    I have a query with the following WHERE clause:

    WHERE thread.post_date UNIX_TIMESTAMP(NOW() - INTERVAL ' . $maxDays . ' DAY)
    How can I use this within getThreads()?
  2. Brent W

    Brent W Well-Known Member

    Just in case anyone else needs help with it:

            $threadModel $this->_getThreadModel();
    $threadConditions = array(
    'post_date' => array('>'XenForo_Application::$time $maxDays 86400),       
    'discussion_state' => 'visible',
    'discussion_open' => '1'
    $threadFetchOptions = array(
    'join' => XenForo_Model_Thread::FETCH_AVATAR,
    'order' => 'view_count',
    'limit' => $maxThreads
    $threads $threadModel->getThreads($threadConditions$threadFetchOptions);
    TheBigK likes this.
  3. TheBigK

    TheBigK Well-Known Member

    Brent W likes this.

Share This Page