Help query sql

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?

Quote · 15 Nov 2017

Solved

Quote · 15 Nov 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.