本文整理匯總了PHP中type::select方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::select方法的具體用法?PHP type::select怎麽用?PHP type::select使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::select方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buscar
/**
*
* @param int $id
*/
public function buscar($id = null)
{
if (empty($id)) {
return $this->table->fetchAll($this->table->select());
}
throw new Exception('Não iplementado');
}
示例2: update
/**
*
* @param PMSEObservable $subject
* @return type
*/
public function update($subject)
{
if (method_exists($subject, 'getProcessDefinition')) {
$this->logger->debug("Trigger update of a Related Relationship for a Process Definitions update");
$processDefinition = $subject->getProcessDefinition();
$processDefinitionData = $processDefinition->fetched_row;
$fields = array('id', 'rel_element_type');
$relatedDependency = $this->getRelatedDependencyBean();
$this->sugarQuery->select($fields);
$this->sugarQuery->from($relatedDependency);
$this->sugarQuery->where()->queryAnd()->addRaw("pro_id='{$processDefinitionData['id']}' AND prj_id='{$processDefinitionData['prj_id']}' AND deleted=0");
$result = $this->sugarQuery->compileSql();
$this->logger->debug("Retrieve dependencies query: {$result}");
$rows = $this->sugarQuery->execute();
foreach ($rows as $row) {
$bean = $this->getRelatedDependencyBean($row['id']);
$bean->pro_status = $processDefinitionData['pro_status'];
$bean->pro_locked_variables = $processDefinitionData['pro_locked_variables'];
$bean->pro_terminate_variables = $processDefinitionData['pro_terminate_variables'];
if ($bean->pro_module !== $processDefinitionData['pro_module'] && $row['rel_element_type'] == 'TERMINATE') {
$bean->deleted = true;
}
$bean->save();
}
$this->processRelatedDependencies($processDefinitionData);
$depNumber = count($rows);
$this->logger->debug("Updating {$depNumber} dependencies");
}
return $result;
}
示例3: findByPrimaryKey
/**
*
* @access public
* @since unknown
* @param type $value
* @return type
*/
public function findByPrimaryKey($value)
{
$this->daoMetadata->select($this->getFields());
$this->daoMetadata->from($this->getTableName());
$this->daoMetadata->like('s_site', $value, 'both');
$result = $this->daoMetadata->get();
if ($result == false) {
return array();
}
return $result->row();
}
示例4: tigoSubscribers
public function tigoSubscribers($paginated = false)
{
$digit1 = '027';
$digit2 = '057';
if ($paginated) {
// create a new Select object for the table contact
$select = new Select('contacts');
$select->where(array('mobile' => $digit1, 'mobile' => $digit2));
$select->order(array('first_name' => 'first_name'));
// create a new result set based on the issue entity
$resultSetPrototype = new ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new \Ekontact\Model\Contact());
// create a new pagination adapter object
$paginatorAdapter = new DbSelect($select, $this->tableGateway->getAdapter(), $resultSetPrototype);
$paginator = new Paginator($paginatorAdapter);
return $paginator;
}
$resultSet = $this->tableGateway->select();
return $resultSet;
}
示例5: save
/**
* Save
*
* @return integer
*/
public function save()
{
if (is_array($this->primaryKey)) {
// @todo compound primary keys
}
if (isset($this->originalData[$this->primaryKey])) {
// UPDATE
$where = array($this->primaryKey => $this->originalData[$this->primaryKey]);
$data = $this->currentData;
unset($data[$this->primaryKey]);
$rowsAffected = $this->tableGateway->update($data, $where);
} else {
// INSERT
$rowsAffected = $this->tableGateway->insert($this->currentData);
$primaryKey = $this->tableGateway->getLastInsertId();
$where = array($this->primaryKey => $primaryKey);
}
// refresh data
$result = $this->tableGateway->select($where);
$rowData = $result->current();
$this->populateOriginalData($rowData);
return $rowsAffected;
}
示例6: validateReclaimCase
/**
* Method to validate whether a case been claimed
* @param $casID
* @param $casIndex
* @return object
*/
public function validateReclaimCase($casID, $casIndex)
{
//TODO Review functionality
$res = array();
//new stdClass();
$res['success'] = true;
$res['result'] = false;
//$caseBean = new BpmInbox();
$caseBean = $this->getInboxBean();
$this->sugarQueryObject->select(array('a.cas_id'));
$this->sugarQueryObject->from($caseBean, array('alias' => 'a'));
$this->sugarQueryObject->joinRaw("LEFT JOIN pmse_bpm_flow b ON (a.cas_id = b.cas_id)", array('alias' => 'b'));
$this->sugarQueryObject->where()->queryAnd()->addRaw("b.cas_id = {$casID} and a.cas_index = {$casIndex}");
$rows = $this->sugarQueryObject->execute();
$caseData = $rows[0];
$res['message'] = translate('LBL_PMSE_LABEL_ERROR_INVALIDCLAIM', 'pmse_Project');
if ($caseData['cas_start_date'] == '') {
$res['result'] = true;
}
return $res;
}
示例7: giftbook_page_data
/**
* 獲取商品分頁數據
* @param type $dtparser datatable類庫
*/
public function giftbook_page_data($dtparser)
{
$cols = $this->_giftbook_page_cols();
$sort_cols = array('7' => '`goods_num`');
$filter_cols = array();
$goup_by = array('`gift_book`.`id`');
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_giftbook_tb);
$dtparser->join('`gift_management`.`theme`', 'theme.id=gift_book.theme_id', 'left');
$dtparser->join('`gift_management`.`set`', 'set.id=gift_book.set_id', 'left');
$dtparser->join('`gift_management`.`book_goods_mapping`', 'book_goods_mapping.gift_book_id=gift_book.id', 'left');
//條件
$cwhere = $this->get_giftbook_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count_group($goup_by, $cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get_group($goup_by, $cwhere);
$arr = $query->result_array();
$this->ajax_giftbook_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例8: theme_page_data
/**
* 獲取主題分頁數據
* @param type $dtparser datatable類庫
*/
public function theme_page_data($dtparser)
{
$cols = array('`theme`.`id`', '`theme`.`name`', '`theme`.`status`', 'IF(`gift_book`.`id`IS NULL,0,COUNT(DISTINCT(`gift_book`.`id`))) AS `num`', '`theme`.`remark`');
$sort_cols = array('4' => '`num`');
$filter_cols = array();
//查詢主表
$dtparser->select($cols, $sort_cols, $filter_cols, FALSE);
$dtparser->from($this->_theme_tb);
$dtparser->join('`gift_management`.`gift_book`', 'gift_book.theme_id=theme.id', 'left');
$group = array('`theme`.`id`');
//條件
$cwhere = $this->get_theme_page_where();
$d['code'] = 0;
$d['iTotal'] = 0;
$d['iFilteredTotal'] = 0;
$d['aaData'] = array();
if ($d['code'] == 0) {
$d['iTotal'] = $dtparser->count_group($group, $cwhere);
$d['iFilteredTotal'] = $d['iTotal'];
$query = $dtparser->get_group($group, $cwhere);
$arr = $query->result_array();
$this->ajax_list_table_data($arr);
$d['aaData'] = $arr;
}
return $d;
}
示例9: 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;
}
示例10: 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;
}
示例11: fetchAll
public function fetchAll()
{
$resultSet = $this->tableGateway->select();
return $resultSet;
}
示例12: 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;
}
示例13: 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;
}
示例14: 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;
}