本文整理汇总了PHP中BaseModel::set_all_time方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseModel::set_all_time方法的具体用法?PHP BaseModel::set_all_time怎么用?PHP BaseModel::set_all_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseModel
的用法示例。
在下文中一共展示了BaseModel::set_all_time方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_seek_all_data
/**
* 获取所有理财产品
*/
public function api_seek_all_data()
{
$data = $this->field('id,name,content,create_time')->where(array('status' => 0))->select();
if (!empty($data)) {
$reg = "'([\\s])[\\s]+'";
//匹配换号符号
foreach ($data as $key => $val) {
$data[$key]['content'] = preg_replace($reg, "|", $val['content']);
}
}
parent::set_all_time($data, array('create_time'));
return $data;
}
示例2: seek_user_record
/**
* 获取当前用户下用户浏览产品的日志
* @param String $account 用户账号
*/
public function seek_user_record($account)
{
$data = $this->field('p.name,bl.time')->table($this->prefix . 'browse_log AS bl')->join($this->prefix . 'product AS p ON bl.product_id = p.id')->join($this->prefix . 'users AS u ON bl.users_id = u.id')->where(array('u.account' => $account))->order('bl.id DESC')->select();
parent::set_all_time($data, array('time'));
return $data;
}
示例3: seek_one_data
public function seek_one_data($id)
{
$data = $this->field('id,name,content,create_time')->where(array('status' => 0, 'id' => $id))->find();
$data ? parent::set_all_time($data, array('create_time')) : $data;
return $data;
}
示例4: seek_all_data
/**
* 获取广告数据
*/
public function seek_all_data()
{
$data = $this->field('a.id AS aid,p.id,f.file_address,p.name,a.time')->table($this->prefix . 'advertisement AS a')->join($this->prefix . 'product AS p ON a.product_id = p.id')->join($this->prefix . 'file AS f ON a.file_id = f.id')->where(array('a.status' => 0))->select();
parent::set_all_time($data, array('time'));
return $data;
}