Orit Active member Nov 13, 2024 #1 Hi I'm looking for a way to display the number of users watching each thread. I tried this: $thread.Watch.count() and it seems to be what I'm looking for. Can anyone confirm this? Thanks!!
Hi I'm looking for a way to display the number of users watching each thread. I tried this: $thread.Watch.count() and it seems to be what I'm looking for. Can anyone confirm this? Thanks!!
Jeremy P XenForo developer Staff member Nov 13, 2024 #2 That'll work, but it'll also load all the corresponding entities. It may be better to do this, which will only query the count: HTML: $thread.getRelationFinder('Watch').total()
That'll work, but it'll also load all the corresponding entities. It may be better to do this, which will only query the count: HTML: $thread.getRelationFinder('Watch').total()
Orit Active member Nov 13, 2024 #3 Jeremy P said: That'll work, but it'll also load all the corresponding entities. It may be better to do this, which will only query the count: HTML: $thread.getRelationFinder('Watch').total() Click to expand... Thank you very much!!
Jeremy P said: That'll work, but it'll also load all the corresponding entities. It may be better to do this, which will only query the count: HTML: $thread.getRelationFinder('Watch').total() Click to expand... Thank you very much!!