本文整理汇总了PHP中CI_Model::getRowByColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Model::getRowByColumn方法的具体用法?PHP CI_Model::getRowByColumn怎么用?PHP CI_Model::getRowByColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CI_Model
的用法示例。
在下文中一共展示了CI_Model::getRowByColumn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function __construct()
{
parent::__construct();
// Load Base CodeIgniter files
$this->load->database();
$this->load->library('session');
$this->load->helper('url');
$this->load->helper('html');
$this->load->library('form_validation');
//Load models
$this->load->model('base_model');
$this->load->model('preferences/preference_model','preference');
// Load site wide modules
$this->load->library('status/status');
$this->load->library('site/bep_site');
$this->load->library('site/bep_assets');
$this->load->library('page/Page');
$this->load->library('auth/userlib');
// Load the SITE asset group
$this->bep_assets->load_asset_group('SITE');
// Get list parent categories
$model=new CI_Model();
$this->data['parents']=$model->getListByColumn('tn_categories','category_parent_id',0);
//set lang (auto)
$this->setLang();
// tuyet get facebook, twitter info,content tel
//$this->data['$cateProduct']=$model->getRowByColumn('tn_contact','category_name','')
$this->data['faceInfo']=$model->getRowByColumn('tn_info', 'info_name', 'facebook');
$this->data['twitterInfo']=$model->getRowByColumn('tn_info', 'info_name', 'twitter');
$this->data['movilInfo']=$model->getRowByColumn('tn_info', 'info_name', 'movil');
$this->data['telefonoInfo']=$model->getRowByColumn('tn_info', 'info_name', 'telefono');
// end tuyet
}
示例2: getCounting
function getCounting()
{
$today=date('Y-m-d',time()+7*3600);
$model=new CI_Model();
$today_counting=$model->getRowByColumn('thongke','ngaythang',$today)->soluong;
$data['today']=$today_counting;
$segments=explode('-', $today);
$current_month= $segments[0].'-'.$segments[1];
$listByMonth=$model->getListByColumnLikeText('thongke','ngaythang',$current_month);
$month_count=0;
foreach ($listByMonth as $item)
{
$month_count+=$item->soluong;
}
$data['month']=$month_count;
$listAll=$model->getListFull('thongke');
$total_count=0;
foreach ($listAll as $item)
{
$total_count+=$item->soluong;
}
$data['total']=$total_count;
return $data;
}