本文整理汇总了PHP中SSP::simple1方法的典型用法代码示例。如果您正苦于以下问题:PHP SSP::simple1方法的具体用法?PHP SSP::simple1怎么用?PHP SSP::simple1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSP
的用法示例。
在下文中一共展示了SSP::simple1方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContact
public function getContact($type = "")
{
if (isset($type) && $type != "") {
$extraWhere = 'type =' . $type;
} else {
$extraWhere = '';
}
$table = 'inv_contact';
$primaryKey = 'id';
$columns = array(array('db' => 'name', 'dt' => 0, 'field' => 'name', 'searchable' => 'name', 'formatter' => function ($d, $row) {
return '<a href="contact/item/' . $row['id'] . '" style="color:blue;">' . $d . '</a>';
}), array('db' => 'type', 'dt' => 1, 'field' => 'type', 'formatter' => function ($d, $row) {
$a = $d == 1 ? 'Client' : 'Supplier';
return $a;
}), array('db' => 'phone', 'dt' => 2, 'field' => 'phone', 'searchable' => 'phone'), array('db' => 'email', 'dt' => 3, 'field' => 'email', 'searchable' => 'email'), array('db' => 'country', 'dt' => 4, 'field' => 'country', 'searchable' => 'country'), array('db' => 'id', 'dt' => 5, 'field' => 'action', 'formatter' => function ($d, $row) {
return '<a href="contact/edit/' . $d . '" class="btn btn-xs show-tooltip" title="" data-original-title="Edit"><span class="fa fa-edit"></span></a>';
}));
$joinQuery = 'SELECT * FROM inv_contact $where $order $limit';
echo json_encode(SSP::simple1($_REQUEST, $this->_sql_details, $table, $primaryKey, $columns, $joinQuery, $extraWhere));
}
示例2: function
array( 'db' => 'sals.remarks', 'dt' => 11, 'field' => 'remarks', 'formatter' => function( $d, $row ) {
return '-';
}),
array( 'db' => 'sals.id', 'dt' => 12 , 'field' => 'id' , 'formatter' => function( $d, $row ) {
return '-';
}),
array( 'db' => 'cus.customername', 'dt' => 13, 'field' => 'customername' ),
array( 'db' => 'ccpi.name' , 'field' => 'name' , 'dt' => 14 ),
array( 'db' => 'brnch.branchname' , 'field' => 'branchname' , 'dt' => 15),
array( 'db' => 'inst.name', 'dt' => 16, 'field' => 'name' ),
array( 'db' => 'bra.brandname', 'dt' => 17, 'field' => 'brandname' ),
array( 'db' => 'des.model_no', 'dt' => 18, 'field' => 'model_no' ),
array( 'db' => 'ran.range_name', 'dt' => 19, 'field' => 'range_name' ),
array( 'db' => 'des.sales_calllocation', 'dt' => 20, 'field' => 'sales_calllocation' ),
array( 'db' => 'des.sales_calltype', 'dt' => 21, 'field' => 'sales_calltype' ),
array( 'db' => 'dept.departmentname', 'dt' => 22, 'field' => 'departmentname' ),
array( 'db' => 'des.sales_unitprice', 'dt' => 23, 'field' => 'sales_unitprice' ),
array( 'db' => 'des.title1_val', 'dt' => 24, 'field' => 'title1_val' ),
array( 'db' => 'des.title2_val', 'dt' => 25, 'field' => 'title2_val' ),
array( 'db' => 'des.title3_val', 'dt' => 26, 'field' => 'title3_val' ),
array( 'db' => 'des.title4_val', 'dt' => 27, 'field' => 'title4_val' ),
array( 'db' => 'des.title5_val', 'dt' => 28, 'field' => 'title5_val' ),
);
echo json_encode(
SSP::simple1( $_GET, $sql_details, $table, $primaryKey, $columns , $where1, $where2 ,$join)
);