Hello,
I want to build a table of the member's contact list (thanks to its id)
I started like that, but maybe there is a more sophisticated way of doing that?
$state = 1; // 1 pour les amis / -1 si la personne n'est plus amie
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('actor_id'))
->from($db->quoteName('#__social_friends'))
->where($db->quoteName('target_id')." = ".$db->quote($idTarget)."AND".$db->quoteName('state')." = ".$db->quote($state));
$db->setQuery($query);
$row = $db->loadRowList();
// print_r ($row);
Best regards.
Eric