public function get_total()
    {
        if ($this->total) {
            return $this->total;
        }

        $conn = $this->app->getApplicationBox()->get_connection();

        $sql_count = 'SELECT COUNT(DISTINCT Users.id) as total ' . $this->generate_sql_constraints();

        $stmt = $conn->prepare($sql_count);
        $stmt->execute($this->sql_params);
        $row = $stmt->fetch(PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $this->total = $row['total'];

        $this->page = 1;
        if ($this->total > 0 && is_int($this->offset_start) && is_int($this->results_quantity)) {
            $this->page = floor($this->offset_start / $this->results_quantity) + 1;
            $this->total_page = floor($this->total / $this->results_quantity) + 1;
        }

        return $this->total;
    }
public function get_total()
    {
        if ($this->total) {
            return $this->total;
        }

        $conn = $this->app->getApplicationBox()->get_connection();

        $sql_count = 'SELECT COUNT(DISTINCT Users.id) as total ' . $this->generate_sql_constraints();

        $stmt = $conn->prepare($sql_count);
        $stmt->execute($this->sql_params);
        $row = $stmt->fetch(PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $this->total = $row['total'];

        $this->page = 1;
        if ($this->total > 0 && is_int($this->offset_start) && is_int($this->results_quantity)) {
            $this->page = floor($this->offset_start / $this->results_quantity) + 1;
            $this->total_page = floor($this->total / $this->results_quantity) + 1;
        }

        return $this->total;
    }
public function get_total ( ) { if ( $ this -> total ) { return $ this -> total ; } $ conn = $ this -> app -> getApplicationBox ( ) -> get_connection ( ) ; $ sql_count = 'SELECT COUNT(DISTINCT Users.id) as total ' . $ this -> generate_sql_constraints ( ) ; $ stmt = $ conn -> prepare ( $ sql_count ) ; $ stmt -> execute ( $ this -> sql_params ) ; $ row = $ stmt -> fetch ( PDO :: FETCH_ASSOC ) ; $ stmt -> closeCursor ( ) ; $ this -> total = $ row [ 'total' ] ; $ this -> page = 1 ; if ( $ this -> total > 0 && is_int ( $ this -> offset_start ) && is_int ( $ this -> results_quantity ) ) { $ this -> page = floor ( $ this -> offset_start / $ this -> results_quantity ) + 1 ; $ this -> total_page = floor ( $ this -> total / $ this -> results_quantity ) + 1 ; } return $ this -> total ; }
Get total of fetched users

@return int
Get total of fetched users