本文整理匯總了PHP中type::count方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::count方法的具體用法?PHP type::count怎麽用?PHP type::count使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::count方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: asyncIoSchedule
/**
* @brief 異步IO任務調度
* 主要是為了資源的安全釋放和更快速的回收
* @param \Aha\Coroutine\Task $task
*/
public function asyncIoSchedule(\Aha\Coroutine\Task $task)
{
$this->schedule($task);
//這種情況下 如果隻有一個任務 需要自己調度自己
if ($this->_taskQueue->count() === 1) {
$this->run();
}
}
示例2: crearPaginacion
/**
* Crea la paginacion de la pagina con respecto a la cantidad de registros
* @param type $query
* @return objeto json
*/
public function crearPaginacion($query)
{
try {
$count = $query->count();
} catch (ParseException $ex) {
return json_encode([pag => 'Error en la Base de datos', error => $ex->getMessage()]);
}
$paguinacion = $count / 10;
return json_encode([pag => $paguinacion]);
}
示例3: goods_page_data
/**
* 獲取商品分頁數據
* @param type $dtparser datatable類庫
*/
public function goods_page_data($dtparser)
{
$cols = $this->_goods_page_cols();
$sort_cols = array('0' => '`gift`.`ctime`', '4' => '`gift`.`store_num`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_goods_tb);
$dtparser->join('`gift_management`.`gift_brand`', 'gift_brand.id=gift.brand_id', 'left');
$dtparser->join('`gift_management`.`gift_classify`', 'gift_classify.id=gift.classify_id', 'left');
$dtparser->join('`gift_management`.`gift_supply`', 'gift_supply.id=gift.supply_id', 'left');
//條件
$cwhere = $this->get_goods_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count($cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get($cwhere);
$arr = $query->result_array();
$this->ajax_goods_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例4: giftcard_order_list_page_data
/**
* 禮品卡開卡列表
* @param type $dtparser
* @return type
*/
public function giftcard_order_list_page_data($dtparser)
{
$cols = array('`card_order`.`id`', '`card_order`.`trade_date`', '`user`.`nick_name` as `sales`', '`customer`.`name` as `customer`', '`card_order`.`contact_person`', '`card_order`.`order_name`', '`card_order`.`price`', '`card_order`.`pay_status`', '`card_order`.`pay_remark`', '`card_order`.`remark`', '`card_order`.`trade_date`', '`card_order`.`wechat_id`', '`card_order`.`custom_id`', '`card_order`.`sales_id`', '`card_order`.`end_user`', '`card_order`.`modify_user`');
$sort_cols = array('6' => '`price`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_card_order_tb);
$dtparser->join('`gift_management`.`user`', 'user.id=card_order.sales_id', 'left');
$dtparser->join('`gift_management`.`customer`', 'customer.id=card_order.custom_id', 'left');
//條件
$cwhere = $this->get_giftcard_order_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count($cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get($cwhere);
$arr = $query->result_array();
$this->ajax_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例5: wechat_page_data
/**
* 獲取客戶分頁數據
* @param type $dtparser datatable類庫
*/
public function wechat_page_data($dtparser)
{
$cols = array('`wechat`.`id`', '`wechat`.`name`', '`wechat`.`style`', '`wechat`.`status`', '`wechat`.`vedio_id`', '`wechat`.`pic_id`', '`wechat`.`audio_id`', '`wechat`.`sender`', '`wechat`.`reciver`', '`wechat`.`remark`', '`wechat`.`copywriter`');
$sort_cols = array('4' => '`wechat`.`status`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_wechat_tb);
//條件
$cwhere = $this->get_wechat_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count($cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get($cwhere);
$arr = $query->result_array();
$this->ajax_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例6: website_page_data
/**
* 獲取客戶分頁數據
* @param type $dtparser datatable類庫
*/
public function website_page_data($dtparser)
{
$cols = array('`website`.`id`', '`website`.`name`', '`website`.`status`', '`website`.`type`', '`website`.`hotline`', '`website`.`qq`', '`website`.`expire_date`', '`website`.`domain`');
$sort_cols = array('4' => '`website`.`status`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_website_tb);
//條件
$cwhere = $this->get_website_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count($cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get($cwhere);
$arr = $query->result_array();
$this->ajax_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例7: customer_page_data
/**
* 獲取客戶分頁數據
* @param type $dtparser datatable類庫
*/
public function customer_page_data($dtparser)
{
$cols = array('`customer`.`id`', '`customer`.`name`', '`customer`.`status`', '`customer`.`type`', '`customer`.`contact_person`', '`customer`.`phone`', '`customer`.`address`', '`customer`.`status`');
$sort_cols = array('4' => '`customer`.`status`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_customer_tb);
//條件
$cwhere = $this->get_customer_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count($cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get($cwhere);
$arr = $query->result_array();
$this->ajax_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}