[RSS Feed/News] Finder total() returns 0

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hey guys,

I'm trying to get the number of users with XenForo's finder, but it always returns 0:
PHP:

Code:
$finder = \XF::finder('XF:User');
$countUsers = $finder->where('custom_title', 'LIKE', 'String%')->total();
// returns 0

Although the same query returns the correct amount in phpMyAdmin:
SQL:

Code:
SELECT * FROM `xf_user` WHERE `custom_title` LIKE 'String%';

// returns 3 results

What am I doing wrong?

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