We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You're doing a lot of extra queries in the loop you have setup. It looks like the filter method may support an 'IN' operator as the 3rd argument.
$members = ee('Model')->get('Member')->all(); $memberIds = []; // Do something here, a loop maybe, to get all the member ids. $data = ""; $count = 0; $entries = ee('Model')->get('ChannelEntry') ->filter('channel_id', $channel) ->filter('author_id', $memberIds, 'IN') ->all(); // Would count($entries) work here instead? foreach ($entries as $entry) { $count++; } if ($count != 0) { $data["mem_id"] = $member->member_id; $data["mem_name"] = $member->screen_name; $data["counted"] = $count; $vars[] = $data; }
The text was updated successfully, but these errors were encountered:
You're also defining $data as a string, then later using it as an array.
$data = [];
Sorry, something went wrong.
No branches or pull requests
You're doing a lot of extra queries in the loop you have setup. It looks like the filter method may support an 'IN' operator as the 3rd argument.
The text was updated successfully, but these errors were encountered: