[RSS Feed/News] Best practices in using XF::finder

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
This is a bit of a generic ask, but my add-on stores associated records to a user by user_id. When surfacing up information, is it proper to use $finder = \XF::finder('XF:User'); $user = $finder->where('user_id', 1)->fetchOne(); within a foreach loop to get the associated user's information?

If each finder for each user translates to a select * from xf_user table, that seems like a really expensive design / will hammer the database...

Read more
Read more about this Feed . . .
 
Status
Not open for further replies.
Back
Top Bottom