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,
// 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,