当前位置: 首页>>代码示例>>PHP>>正文


PHP SSP::simple1方法代码示例

本文整理汇总了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));
 }
开发者ID:nikunj1806,项目名称:product-manager,代码行数:20,代码来源:datatable.class.php

示例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)
);
开发者ID:ArunPrasaath,项目名称:bs,代码行数:31,代码来源:TrackComplete-table.php


注:本文中的SSP::simple1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。