Hello
i get this from Ura soul's related item plugin :
$options = array(
'order_by' => 'match_count DESC, e.time_created DESC',
'group_by' => 'e.guid',
'metadata_names' => 'tags',
'metadata_case_sensitive' => FALSE,
'metadata_values' => $tags,
'selects' => array('count(msv.string) as match_count'),
);echo elgg_list_entities_from_metadata($options)
the problem is there is no elgg_list_river_from_metadata($options) , can someone help me to make a custom query or give other solution ?
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.
Just iterate through all tags/names and use elgg_get_metastring_id()
like this ?
Thanks it works :D thank you so much
okay i have some question
1. why we use :
not just
2. How to do this in case insensitive condition ? i want "Health" and "health" can be return same result
1. If you don't restrict the search by name you will end up matching by ALL entity metadata, not just tags.
2. There should be a function to get case sensitive metastring IDs somewhere.
- Previous
- 1
- 2
- Next
You must log in to post replies.