azat.kilibayev

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • in reply to: treegrid PHPsuito 5.1 Adjacency model broken? #125078
    azat.kilibayev
    Participant

    it works, thanks

    in reply to: treegrid PHPsuito 5.1 Adjacency model broken? #125074
    azat.kilibayev
    Participant

    the same result no data

    {“userdata”:[],”rows”:[],”total”:0,”page”:1}

    in reply to: treegrid PHPsuito 5.1 Adjacency model broken? #125072
    azat.kilibayev
    Participant

    i use trial/limited demo

    in reply to: treegrid PHPsuito 5.1 Adjacency model broken? #125070
    azat.kilibayev
    Participant

    Sample data

    DROP TABLE IF EXISTS adj_table;
    CREATE TABLE adj_table (
    emp_id int(11) NOT NULL AUTO_INCREMENT,
    name varchar(30) NOT NULL,
    salary decimal(10,2) DEFAULT ‘0.00’,
    boss_id int(11) DEFAULT NULL,
    PRIMARY KEY (emp_id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;

    INSERT INTO adj_table (emp_id, name, salary, boss_id) VALUES
    (10, ‘Albert’, 1000.00, NULL),
    (11, ‘Bert’, 900.00, 10),
    (12, ‘Chuck’, 900.00, 10),
    (13, ‘Donna’, 800.00, 12),
    (14, ‘Eddie’, 700.00, 12),
    (15, ‘Fred’, 600.00, 12);

    in reply to: treegrid PHPsuito 5.1 Adjacency model broken? #125068
    azat.kilibayev
    Participant

    Here is the code

    require_once ‘../../lib/conf/_jq-config.php’;
    require_once ‘../../lib/ext/PHPSuito5/DBdrivers/jqGridPdo.php’;
    require_once ‘../../lib/ext/PHPSuito5/jqTreeGrid.php’;

    $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
    $tree = new jqTreeGrid($conn);
    $tree->SelectCommand = “SELECT * FROM adj_table”;
    $tree->table = ‘adj_table’;
    $tree->setPrimaryKeyId(’emp_id’);
    $tree->setTreeModel(‘adjacency’);
    $tree->setTableConfig(array(‘id’=>’emp_id’, ‘parent’=>’boss_id’));
    $tree->showError = true;
    $tree->setColModel();
    $tree->setUrl(‘loadlib_show_tree.php’);
    $tree->dataType = ‘json’;
    $tree->renderTree(‘#tree’, ‘#pager’, true,null, null, true, true);

     

     

Viewing 5 replies - 1 through 5 (of 5 total)

Stay connected with us in your favorite flavor!