NotificationTarget::getFromDBForTarget PHP Method

getFromDBForTarget() public method

Retrieve an item from the database for a specific target
public getFromDBForTarget ( $notifications_id, $type, $ID ) : true
$notifications_id integer notification ID
$type type of the target to retrive
$ID integer ID of the target to retrieve
return true if succeed else false
    function getFromDBForTarget($notifications_id, $type, $ID)
    {
        if ($this->getFromDBByQuery("WHERE `" . $this->getTable() . "`.`notifications_id` = '{$notifications_id}'\n                                  AND `" . $this->getTable() . "`.`items_id` = '{$ID}'\n                                  AND `" . $this->getTable() . "`.`type` = '{$type}'")) {
            return true;
        }
        return false;
    }