src/Operations/Fetchable.php
public function scalar($index = 0)
    {
        $stmt = $this->execute();

        if ($stmt) {
            return $stmt->fetchColumn($index);
        } else {
            return false;
        }
    }
public function scalar($index = 0)
    {
        $stmt = $this->execute();

        if ($stmt) {
            return $stmt->fetchColumn($index);
        } else {
            return false;
        }
    }
public function scalar ( $ index = 0 ) { $ stmt = $ this -> execute ( ) ; if ( $ stmt ) { return $ stmt -> fetchColumn ( $ index ) ; } else { return false ; } }
Executes a query and returns a value from the first row.

@param int $index zero-indexed column to fetch

@return mixed|bool result
Executes a query and returns a value from the first row .