protected function findLink($originalTable, $originalId)
    {
        $link = $this->db->table('table_links')
                         ->where('original_table', $originalTable)
                         ->where('original_id', $originalId)
                         ->first();

        if (is_null($link)) {
            $this->error('Could not find a link from ' . $originalTable . ' with an id of ' . $originalId);

            return false;
        }

        return $link->new_id;
    }
protected function findLink($originalTable, $originalId)
    {
        $link = $this->db->table('table_links')
                         ->where('original_table', $originalTable)
                         ->where('original_id', $originalId)
                         ->first();

        if (is_null($link)) {
            $this->error('Could not find a link from ' . $originalTable . ' with an id of ' . $originalId);

            return false;
        }

        return $link->new_id;
    }
protected function findLink ( $ originalTable , $ originalId ) { $ link = $ this -> db -> table ( 'table_links' ) -> where ( 'original_table' , $ originalTable ) -> where ( 'original_id' , $ originalId ) -> first ( ) ; if ( is_null ( $ link ) ) { $ this -> error ( 'Could not find a link from ' . $ originalTable . ' with an id of ' . $ originalId ) ; return false ; } return $ link -> new_id ; }
Find a new table id based on the old table and id.

@param string  $originalTable
@param integer $originalId

@return mixed
Find a new table id based on the old table and id .