Model/Base.php
function checkLink($link, $id)
    {
        $result = $this->db->query('SELECT link 
                                      FROM '.$this->articleTable.' 
                                      WHERE link = :link 
                                      AND id != :id',

                              [':link'=>$link,
                               ':id'=>0+$id]);
        if (isset($result[0])) {
            return $result[0]->get('link');
        }
        
            $this->db->query('UPDATE '.$this->articleTable.'
                            SET link = :link
                            WHERE id = :id',

                    [':link'=>$link,
                     ':id'=>0+$id]);
            return false;
    }
function checkLink($link, $id)
    {
        $result = $this->db->query('SELECT link 
                                      FROM '.$this->articleTable.' 
                                      WHERE link = :link 
                                      AND id != :id',

                              [':link'=>$link,
                               ':id'=>0+$id]);
        if (isset($result[0])) {
            return $result[0]->get('link');
        }
        
            $this->db->query('UPDATE '.$this->articleTable.'
                            SET link = :link
                            WHERE id = :id',

                    [':link'=>$link,
                     ':id'=>0+$id]);
            return false;
    }
function checkLink ( $ link , $ id ) { $ result = $ this -> db -> query ( 'SELECT link 
                                      FROM ' . $ this -> articleTable . ' 
                                      WHERE link = :link 
                                      AND id != :id' , [ ':link' => $ link , ':id' => 0 + $ id ] ) ; if ( isset ( $ result [ 0 ] ) ) { return $ result [ 0 ] -> get ( 'link' ) ; } $ this -> db -> query ( 'UPDATE ' . $ this -> articleTable . '
                            SET link = :link
                            WHERE id = :id' , [ ':link' => $ link , ':id' => 0 + $ id ] ) ; return false ; }
Check link and if ID is diferent
@param  [type] $link [description]
@param  [type] $id   [description]
@return [type]       [description]
Check link and if ID is diferent