Results 1 to 3 of 3

Thread: problem with paging

  1. #1
    Sencha User nibblas's Avatar
    Join Date
    Oct 2010
    Location
    switzerland
    Posts
    22

    Default problem with paging

    hy to all

    i have problems with my paging.
    start and limit parameter where correct passed to php file.

    but if i page forward, the limit parameter won't raise....

    have a look at my screeny

    my store
    PHP Code:
    var store = new Ext.data.JsonStore({
                        
    proxy        :proxyFirmenGrid,
                        
    fields        :fieldsFirmenGrid,
                        
    root        :'results',
                         
    autoLoad    true,
                        
    baseParams    :{    
                                    
    task'LISTING'
                        
    },
                        
    idProperty'ID'
            
    }); 
    my paging bar
    PHP Code:
     bbar: new Ext.PagingToolbar({
                    
    pageSize3,
                    
    storestore,
                    
    displayInfotrue
                
    }), 
    php file
    PHP Code:
    function getList(){
        
    $query "SELECT     *FROM         B_Firma";
        
     if (isset(
    $_POST['query'])){
        
    $query .= " WHERE(Firma LIKE '%".addslashes($_POST['query'])."%' OR Aktiv LIKE '%".addslashes($_POST['query'])."%')";
      }
      
        
    $result mssql_query($query);
        
    $nbrows mssql_num_rows($result);    
        
        
    $start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);
        
    $ende = (integer) $_POST['limit'];

        
    $query "SELECT *
        FROM   (SELECT ROW_NUMBER() OVER(ORDER BY Firma ASC) AS
               rownum, Firma, Aktiv,CreationDate FROM B_Firma) AS Firmen
        WHERE  rownum BETWEEN "
    .$start." AND ".$ende."
        ORDER BY rownum ASC"
    ;
        
    $result mssql_query($query);
        
        
        if(
    $nbrows>0){
            while(
    $rec mssql_fetch_assoc($result)){
                      
    $arr[] = $rec;
                    
            }
            
    $jsonresult JEncode($arr);
            
    //$jsonresult = $json->encode($arr);
            
    echo '({"total":"'.$nbrows.'","results":'.$jsonresult.'})';
        } else {
            echo 
    '({"total":"0", "results":""})';
        }


    the paging bar should raise the limit and start by every click on next page?!?

    any idea's

    cheers
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Location
    Colorado
    Posts
    51

    Default

    Limit will stay the same, set by pageSize. Start should raise or lower by pageSize when you change the page. Since I see start is 3 in the screen shot, and it probably started at 0 - it seems that it is indeed changing?

  3. #3
    Sencha User nibblas's Avatar
    Join Date
    Oct 2010
    Location
    switzerland
    Posts
    22

    Default

    sure, my mistake... because i'm using mssql the limit statement ist not available...
    i've added the logic to my php file (raised $end with $start) now it's working...

    thanx anyway!

    cheeers

Similar Threads

  1. problem in paging
    By sakaext in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 10 Aug 2009, 2:28 AM
  2. Paging problem
    By rati592 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 1 Jul 2009, 5:30 AM
  3. Paging problem
    By rati592 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 1 Jul 2009, 4:59 AM
  4. paging problem
    By nadeemshafi9 in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 2 Apr 2009, 12:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •