- foreach ( $res as $row ) {
- if ( $currentPage != $row->pp_page ) {
- # Different page than previous row, so add the properties to
- # the result and save the new page id
-
- if ( $currentPage ) {
- if ( !$this->addPageProps( $result, $currentPage, $props ) ) {
- # addPageProps() indicated that the result did not fit
- # so stop adding data. Reset props so that it doesn't
- # get added again after loop exit
-
- $props = array();
- break;
- }
-
- $props = array();
- }