public function execOne()
    {
        $args = func_get_args();

        if (count($args) > 1) {
            $template = array_shift($args);
            $this->currentQuery = vsprintf($template, $args);
        } elseif (count($args) == 1) {
            $this->currentQuery = $args[0];
        } else {
            return null;
        }

        $res = $this->dbExec();
        $rows = $res->count();
        if ($rows > 1) {
            throw $this->createException('Return set contains more than one row');
        } elseif ($rows == 0) {
            return null;
        }

        return $res->current();
    }
public function execOne()
    {
        $args = func_get_args();

        if (count($args) > 1) {
            $template = array_shift($args);
            $this->currentQuery = vsprintf($template, $args);
        } elseif (count($args) == 1) {
            $this->currentQuery = $args[0];
        } else {
            return null;
        }

        $res = $this->dbExec();
        $rows = $res->count();
        if ($rows > 1) {
            throw $this->createException('Return set contains more than one row');
        } elseif ($rows == 0) {
            return null;
        }

        return $res->current();
    }
public function execOne ( ) { $ args = func_get_args ( ) ; if ( count ( $ args ) > 1 ) { $ template = array_shift ( $ args ) ; $ this -> currentQuery = vsprintf ( $ template , $ args ) ; } elseif ( count ( $ args ) == 1 ) { $ this -> currentQuery = $ args [ 0 ] ; } else { return null ; } $ res = $ this -> dbExec ( ) ; $ rows = $ res -> count ( ) ; if ( $ rows > 1 ) { throw $ this -> createException ( 'Return set contains more than one row' ) ; } elseif ( $ rows == 0 ) { return null ; } return $ res -> current ( ) ; }
Execute single row query
@throws DB\Exception
@return array|null
Execute single row query