jqgrid主从表查询+添加grid按钮+查询框的“X”取消+查询框去掉

这篇博客介绍了如何使用jqGrid在PHP中实现主从表查询,包括查询框的清除功能和去除查询框。展示了maingrid()和subgrid()两个函数,分别用于主表格和子表格的数据加载,并提供了重置密码和充值的操作按钮。
摘要由CSDN通过智能技术生成
    public function maingrid(){
    // jqgrid查询
        Vendor('jqSuite.jqGrid');
        Vendor('jqSuite.jqGridPdo');
        $conn = new PDO(C('GRIDB.DSN'),C('GRIDB.USER'),C('GRIDB.PWD')); 
        $conn->query("SET NAMES utf8"); 
        $grid = new jqGridRender($conn); 
        // Write the SQL Query
        $sqlx = "SELECT a.org_id,a.org_no as user_name,a.org_name,a.phone,a.email,a.address,a.consume_money,a.balance";
        $sqlx .= " FROM ".C('DB_PREFIX')."tenants AS a ";
        // $sqlx .= " WHERE a.user_id = ".$this->user_id." AND a.org_id = ".$this->org_id;
          $grid->SelectCommand = $sqlx;
          // Set the table to where you update the data
        $grid->table = C('DB_PREFIX').'tenants';
        // Set output format to json 
        $grid->dataType = 'json'; 
        // Let the grid create the model 
        $grid->setColModel(); 
        // Set the url from where we obtain the data 
        $grid->setUrl('index.php?m=Member&a=maingrid'); 
        // Set some grid options 
        $grid->setGridOptions(array(
            "rowNum"=>15,
            "height"=>450,
            "gridview"=>false,
     
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值