EasyUI Forum
November 05, 2025, 01:10:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: EasyUI 1.5.4.2 pagination on: March 15, 2018, 01:29:14 AM
solved!
in that tutorial this line is missing:
Code:
$offset = ($page-1)*$rows;
2  General Category / General Discussion / Re: EasyUI 1.5.4.2 pagination on: March 14, 2018, 01:41:28 AM
Sorry but in this tutorial I dont understand the origin of value of $offset... With that code I have  error on query

select * from mytable where id like '%%' and cod like '%%'  order by emesso asc limit , 10
3  General Category / General Discussion / EasyUI 1.5.4.2 pagination on: March 09, 2018, 08:31:11 AM
Hi all
I'm using this demo https://www.jeasyui.com/demo/main/index.php CRUD DataGrid with this code

Code:
$sort = isset($_POST['sort']) ? strval($_POST['sort']) : 'sigla';
$order = isset($_POST['order']) ? strval($_POST['order']) : 'asc';
$where = "sigla like '%$_REQUEST[sigla]%'";

    $db_con = new PDO("mysql:host={$db_host};dbname={$db_name}",$db_user,$db_pass);
    $db_con -> exec('SET CHARACTER SET utf8');
    $db_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

        try {                   
        $q = "select * from items  where " . $where . " order by $sort $order";
        $sql = $db_con->prepare($q);
        $sql->execute();
        $rows = $sql->fetchAll(PDO::FETCH_ASSOC);
        echo json_encode($rows);
        }
        catch(PDOException $e)
        {   
          echo $e->getMessage();
        }

but table show all 25 rows founded in db although pagination at bottom work correctly
Page 1 of 3 Displaying 1 to 10 of 25 items

Of course in table grid I have set pagination="true"

The version is the last one 1.5.4.2

Any help please?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!