I am developing a module and I am stuck in an sql query. I need to press the Broadcast button to select all the friends of the event owner instead of all the members that have joined the event.
For this I am modifying this function:
function getBroadcastRecipients ($iEntryId)
{
return $this->getAll ("SELECT DISTINCT `p`.`ID`, `p`.`Email` FROM `" . $this->_sPrefix . $this->_sTableFans . "` AS `f` INNER JOIN `Profiles` as `p` ON (`f`.`id_entry` = '$iEntryId' AND `f`.`id_profile` = `p`.`ID` AND `f`.`confirmed` = 1 AND `p`.`Status` = 'Active')");
}
In this other:
function getBroadcastFriends ($iEntryId)
{
$iautor = $this->getOne ("SELECT `author_id` FROM `" . $this->_sPrefix . $this->"main` WHERE `id` = '$iEntryId' LIMIT 1");
return ???????????;
}
???? It must be a query to store the ID and email of all the friends of $iautor
Could someone help me?