Implemented Fetch Conditions

xf_phantom

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

There's a need to be able to use the same criteria 2 times
e.g.
i'm not able to do something like without the need to use a xfcp class adding e.g.
PHP:
if (!empty($conditions['last_post_date2']) && is_array($conditions['last_post_date2']))
, own method or add another (own) condition
Code:
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;)
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
1.2 has a helper to handle both single- and double-ended limits:
Code:
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.
 
Back
Top Bottom