Question : a problem that get me mad with paginating a partial results

hi
my goal is: a user select a role in a select menu and get the results according to the role he selected.
and then the right results are displayed with pagination.

well most of the work i have done and it works accept the pagination issue. it must be said that the pagination works great if i do not use the filterization.

at the moment, a user select a role ( like a team person) and he get the right result with the right amount of pagination. but when i press the pagination for a certain page, i get a blanck page. no results. so it works great for the first page but not for the other pages of the pagination.

i attach the code that proccess the select menu .

i have tried everything i can think off, but could not find any solution.

best regards

ron
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
if (isset($_POST['submit']))
         {
          
         switch ($_POST['userroles'])
         {
              case 0:
                   //all
                   //make the content to be paginated
                   $items = $db->dbSelectBySql("SELECT id,first_name,last_name,role,confirmed,email,registration_date FROM users ORDER BY registration_date DESC");
                   break;
              case 1:
                   //admins
                   //make the content to be paginated
                   $items = $db->dbSelectBySql("SELECT id,first_name,last_name,role,confirmed,email,registration_date FROM users WHERE role = 1 ORDER BY registration_date DESC");
                   break;
              case 2:
                   //regulars
                   //make the content to be paginated
                   $items = $db->dbSelectBySql("SELECT id,first_name,last_name,role,confirmed,email,registration_date FROM users WHERE role = 2 ORDER BY registration_date DESC");
                   break;
              case 3:
                   //team
                   //make the content to be paginated
                   $items = $db->dbSelectBySql("SELECT id,first_name,last_name,role,confirmed,email,registration_date FROM users WHERE role = 3 ORDER BY registration_date DESC");
                   break;
              case 4:
                   //sellers
                   //make the content to be paginated
                   $items = $db->dbSelectBySql("SELECT id,first_name,last_name,role,confirmed,email,registration_date FROM users WHERE role = 4 ORDER BY registration_date DESC");
                   break;
         }
          //pagination
          //setting the offset
          $offset = $this->params[1];
          
          
          
          if (!$offset)
          {
               $totaloffset = 0;
          }else{
               $totaloffset = $offset * PERPAGE;
          }
          
          
         
          
          //connect the contents and the paginator
          $slicedArray = array_slice($items,$totaloffset,PERPAGE);
          $this->_view->items = $slicedArray;
          
          $pagename = APP_URL . '/admin/users/index/';
          $totalcount = count($items);
          $numpages = ceil($totalcount/PERPAGE);
          $this->_view->numpages = $numpages;
          
          //create the paginator
          $nav = new Shtigliz_PageNavigator($pagename,$totalcount,PERPAGE,$totaloffset,10);
          $nav->setFirstParamName(OFFSET);
          $this->_view->nav = $nav;
          
         }

Answer : a problem that get me mad with paginating a partial results

select segment_name,segment_type from dba_segments where tablespace_name='SOMENAME';
Random Solutions  
 
programming4us programming4us