public function getNamedLock($name, $timeout = 15)
    {
        $stmt = $this->query('SELECT GET_LOCK("' . $name . '", '.$timeout .')');
        return $stmt->fetch(self::FETCH_COLUMN);

    }
public function getNamedLock($name, $timeout = 15)
    {
        $stmt = $this->query('SELECT GET_LOCK("' . $name . '", '.$timeout .')');
        return $stmt->fetch(self::FETCH_COLUMN);

    }
public function getNamedLock ( $ name , $ timeout = 15 ) { $ stmt = $ this -> query ( 'SELECT GET_LOCK("' . $ name . '", ' . $ timeout . ')' ) ; return $ stmt -> fetch ( self :: FETCH_COLUMN ) ; }
Try to obtain a named lock

@author Housseyn Guettaf

@param string $name    - Lock name
@param int    $timeout - Timeout

@return mixed
Try to obtain a named lock