src/Dao/AbstractDao.php
protected function fetchAllWithFound( $sql, $params = null ) {
		$ret = new \StdClass;
		$ret->rows = $this->fetchAll( $sql, $params );

		$ret->found = $this->fetch( 'SELECT FOUND_ROWS() AS found' );
		$ret->found = $ret->found['found'];

		return $ret;
	}
protected function fetchAllWithFound( $sql, $params = null ) {
		$ret = new \StdClass;
		$ret->rows = $this->fetchAll( $sql, $params );

		$ret->found = $this->fetch( 'SELECT FOUND_ROWS() AS found' );
		$ret->found = $ret->found['found'];

		return $ret;
	}
protected function fetchAllWithFound ( $ sql , $ params = null ) { $ ret = new \ StdClass ; $ ret -> rows = $ this -> fetchAll ( $ sql , $ params ) ; $ ret -> found = $ this -> fetch ( 'SELECT FOUND_ROWS() AS found' ) ; $ ret -> found = $ ret -> found [ 'found' ] ; return $ ret ; }
Prepare and execute an SQL statement and return all results plus the
number of rows found on the server side.

The SQL is expected to contain the "SQL_CALC_FOUND_ROWS" option in the
select statement. If it does not, the number of found rows returned is
dependent on MySQL's interpretation of the query.

@param string $sql SQL
@param array $params Prepared statement parameters
@return object StdClass with rows and found memebers
Prepare and execute an SQL statement and return all results plus the number of rows found on the server side .