I would like to query two entities at the same time. Lets say I want to get all the entities "images" where (User Object) user->status = 'active'.
I use to do this like the following:
https://elgg.org/discussion/view/2705400/list-photos-entities-based-on-users-metadata
but this way has been deprecated.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- adrew22a@drew22a
adrew22a - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
You must log in to post replies.Try to use elgg_list_entities with these 'wheres' clauses:
what is $qb and $alias?
Learn it:
https://www.doctrine-project.org/projects/doctrine-dbal/en/2.10/reference/query-builder.html#sql-query-builder
https://github.com/Elgg/Elgg/blob/3.3/engine/classes/Elgg/Database/QueryBuilder.php