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

Implemented Fetch Conditions


Well-known member
They're nice BUT very limited:(

There's a need to be able to use the same criteria 2 times
i'm not able to do something like without the need to use a xfcp class adding e.g.
if (!empty($conditions['last_post_date2']) && is_array($conditions['last_post_date2']))
, own method or add another (own) condition
WHERE thread.last_post_date>= " . $foo
          AND thread.last_post_date<= " . $foo2

if this would be possible, lazy coders wouldn't need to create own methods and own queries for the getXXXByIdRange methods;)


XenForo developer
Staff member
1.2 has a helper to handle both single- and double-ended limits:
if (!empty($conditions['last_post_date']) && is_array($conditions['last_post_date']))
$sqlConditions[] = $this->getCutOffCondition("thread.last_post_date", $conditions['last_post_date']);
The operator is ">=<" with 2 additional values for the lower and upper bound.