[RSS Feed/News] Find posts by max characters length?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Is there a way to find posts by max characters?
I wanna do something like in this query
SELECT * FROM xf_posts WHERE CHAR_LENGTH(message)<10;

with $finder, something like
PHP:

Code:
public function isCharacterLengthLongerThan($max = 10)
{
    $this->where(CHAR_LENGTH(message), '<', $max);
    return $this;
}
PHP:

Code:
$finder = \XF::finder('XF:Posts');
$users = $finder->isCharacterLengthLongerThan(15)->order('post_date', 'DESC')->limit(10);

o0_.svg


is this possible...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom