本文整理汇总了PHP中select_table函数的典型用法代码示例。如果您正苦于以下问题:PHP select_table函数的具体用法?PHP select_table怎么用?PHP select_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了select_table函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$post = I('post.');
$search['keyword'] = trim($post['keyword']);
//标题
$search['language'] = trim($post['language']);
//语言
$search['status'] = trim($post['status']);
//状态
if ($search['keyword'] != '') {
$where['1dcq_news.title'] = array('like', '%' . $search['keyword'] . '%');
}
if ($search['language'] > 0) {
$where['1dcq_news.language'] = array('eq', $search['language']);
}
if ($search['status'] > 0) {
$where['1dcq_news.audit_status'] = array('eq', $search['status'] - 1);
}
$news = M('news')->field('1dcq_news.*,1dcq_attachment.file_url')->join('left join 1dcq_attachment ON 1dcq_news.news_pic = 1dcq_attachment.attachement_id')->order('1dcq_news.order desc,1dcq_news.create_time desc');
// $where = array();
$result = select_table($news, $where, intval(I('pageNumber')), 4);
foreach ($result['data'] as &$v) {
$v['content'] = ltrim(str_replace(' ', '', $v['content']));
$v['content'] = strip_tags($v['content']);
}
$this->assign('search', $search);
$this->assign('list', $result);
$this->display();
}
示例2: pay_four
public function pay_four()
{
$Payment = M('pay_channel')->alias('a')->join('left join ' . C("DB_PREFIX") . 'pay_type as b on b.id = a.channel_type');
$list = select_table($Payment, $where, I('pageNumber'));
$this->assign('list', $list);
$this->display();
}
示例3: index
/**
* 显示当前o2o管理后台角色信息
*/
public function index()
{
$list = select_table('role2', '', I('pageNumber'), 5);
//分页数据
$this->assign('list', $list);
//保存所有角色信息
$this->display('showRole');
}
示例4: index
/**
* 查询合作银行信息
*/
public function index()
{
$bankname = $_REQUEST['brankname'];
if (!empty($bankname)) {
$where['bank_name'] = array('eq', $bankname);
}
$banktable = M('bank')->join('LEFT JOIN 1dcq_attachment on 1dcq_bank.bank_logo=1dcq_attachment.attachement_id');
$bank = select_table($banktable, $where, $_REQUEST['pageNumber'], 5);
$this->assign('bank', $bank);
$this->display('showbank');
}
示例5: index
/**
* 查询计量单位管理信息
*/
public function index()
{
$where = array();
$unit_name = $_REQUEST['unit_name'];
if ($unit_name) {
$where['unit_name'] = array('like', "%{$unit_name}%");
}
$table = M('goods_unit')->order('1dcq_goods_unit.unit_id desc');
$measure = select_table($table, $where, $_REQUEST['pageNumber']);
$this->assign('measure', $measure);
$this->display('showMeaSure');
}
示例6: publish
public function publish()
{
$news = M('news')->field('1dcq_news.*,1dcq_attachment.file_url')->join('left join 1dcq_attachment ON 1dcq_news.news_pic = 1dcq_attachment.attachement_id')->order('1dcq_news.order desc,1dcq_news.create_time desc');
$where = array('1dcq_news.audit_status' => '1');
$result = select_table($news, $where, intval(I('pageNumber')), 4);
foreach ($result['data'] as &$v) {
$v['content'] = ltrim(str_replace(' ', '', $v['content']));
$v['content'] = strip_tags($v['content']);
}
$this->assign('list', $result);
$this->display();
}
示例7: index
public function index()
{
/**
* shop_grade 店铺评级表
*/
$shop_grade = M('rate');
//实例化店铺评级表
$list = select_table('rate', '', I('pageNumber'), 5);
$sum = $shop_grade->count();
$this->assign('sum', $sum);
$this->assign('list', $list);
$this->display();
}
示例8: index
/**
*显示当前o2o管理后台中所有的账户信息
*/
public function index()
{
$this->getMenusRole(6);
$table = M('admin')->join('LEFT JOIN 1dcq_role2 on 1dcq_admin.r_id=1dcq_role2.role_id ');
$list = select_table($table, array('userstate' => array('eq', '1')), $_REQUEST['pageNumber'], 5);
$roleResult = $this->showRole();
//查询所有角色信息
$this->assign('list', $list);
//保存账号分页信息
$this->assign('role', $roleResult);
//保存角色信息
$this->display('showAccount');
}
示例9: index
public function index()
{
$classify_id = I('classify_id');
$classify_name = I('classify_name');
$table = M('operation_classify')->alias('oc')->field("oc.*,at.file_url")->join("left join " . C('DB_PREFIX') . "attachment as at on at.attachement_id=oc.classify_logo_id ")->order('classify_id asc');
$where = array();
if (!empty($classify_id)) {
$where['oc.parent_classify_id'] = array('eq', $classify_id);
} else {
$where['oc.parent_classify_id'] = array('eq', 0);
}
if (!empty($classify_name)) {
$where['oc.classify_name'] = array('like', "%{$classify_name}%");
$where['oc.parent_classify_id'] = array('EGT', 0);
}
//右边
$list = select_table($table, $where, $_REQUEST['pageNumber']);
$kk = ($list['current'] - 1) * $list['pagecount'];
$this->assign('list', $list);
$this->assign('kk', $kk);
//获取左边
$column_list_one = $table->where(array('parent_classify_id' => array('eq', 0)))->order("classify_id asc")->select();
$column_list_two = $table->where(array('parent_classify_id' => array('neq', 0)))->order("classify_id asc")->select();
$column_list = array();
foreach ($column_list_two as $key => $val) {
//$column_list[$val['parent_classify_id']][$key]['classify_name'] = $val['classify_name'];
// $column_list[$val['parent_classify_id']][$key]['classify_id'] = $val['classify_id'];
$column_list[$val['parent_classify_id']][] = array('classify_name' => $val['classify_name'], 'classify_id' => $val['classify_id']);
}
$left_list = array();
foreach ($column_list_one as $k => $v) {
$left_list[$k]['classify_name'] = $v['classify_name'];
$left_list[$k]['classify_id'] = $v['classify_id'];
$left_list[$k]['column_two_list'] = $column_list[$v['classify_id']];
}
//右边
$oneName = $table->where(array('classify_id' => array('eq', $classify_id)))->getField('classify_name');
$this->assign('oneName', $oneName);
$this->assign('left_list', $left_list);
$this->assign('classify_id', $classify_id);
$this->assign('column_list_one', $column_list_one);
/* $_SESSION['dbdata'] = null;
$industryItems = $this->getIndustryItems();
$this->assign('industryItems',$industryItems);
$temps = $this->seachIndutryItems($industryItems,0);
$this->assign('editItems',$temps);
//print_r($temps);*/
$this->display();
}
示例10: index
public function index()
{
$column_id = I('column_id');
$column_name = I('column_name');
$table = M('column')->order('column_index asc');
$where = array();
if (!empty($column_id)) {
$where['parent_column_id'] = array('eq', $column_id);
} else {
$where['parent_column_id'] = array('eq', 0);
}
if (!empty($column_name)) {
$where['column_name'] = array('like', "%{$column_name}%");
$where['parent_column_id'] = array('EGT', 0);
}
//右边
$list = select_table($table, $where, I('pageNumber'));
$this->assign('list', $list);
//获取左边
$column_list_one = $table->where(array('parent_column_id' => array('eq', 0)))->select();
$column_list_two = $table->where(array('parent_column_id' => array('neq', 0)))->select();
$column_list = array();
foreach ($column_list_two as $key => $val) {
//$column_list[$val['parent_column_id']][$key]['column_name'] = $val['column_name'];
// $column_list[$val['parent_column_id']][$key]['column_id'] = $val['column_id'];
$column_list[$val['parent_column_id']][] = array('column_name' => $val['column_name'], 'column_id' => $val['column_id']);
}
$left_list = array();
foreach ($column_list_one as $k => $v) {
$left_list[$k]['column_name'] = $v['column_name'];
$left_list[$k]['column_id'] = $v['column_id'];
$left_list[$k]['column_two_list'] = $column_list[$v['column_id']];
}
$this->assign('left_list', $left_list);
$this->assign('column_id', $column_id);
$this->assign('column_list_one', $column_list_one);
/* $_SESSION['dbdata'] = null;
$industryItems = $this->getIndustryItems();
$this->assign('industryItems',$industryItems);
$temps = $this->seachIndutryItems($industryItems,0);
$this->assign('editItems',$temps);
//print_r($temps);*/
$this->display();
}
示例11: index
public function index()
{
/**
* user_shop_comment 店铺评论表
*
*/
$user_shop_comment = M('user_shop_comment');
//实例化店铺评论表
$where = array();
$comment_time = '';
$name = '';
if ($_POST) {
/*判断时间*/
if (I('comment_time')) {
$time = I('comment_time');
$time_all = explode('-', $time);
$start = strtotime(trim($time_all[0]));
$end = strtotime(trim($time_all[1]));
/*如果是选择同一天*/
if ($start == $end) {
$end = $end + 24 * 60 * 60;
}
$where['UNIX_TIMESTAMP(comment_time)'] = array('between', array($start, $end));
$comment_time = I('comment_time');
}
/*判断单号*/
if (I('name')) {
$name = trim(I('name'));
$where['_string'] = '(1dcq_order.order_id like "%' . $name . '%") OR ( 1dcq_shop.shop_name like "%' . $name . '%") ';
$name = I('name');
}
}
$where['comment_status'] = array('in', '1,2');
$arraylist = $user_shop_comment->join('LEFT JOIN 1dcq_order on 1dcq_order.order_id=1dcq_user_shop_comment.order_id')->join('LEFT JOIN 1dcq_user on 1dcq_user.user_id=1dcq_user_shop_comment.user_id')->join('LEFT JOIN 1dcq_shop on 1dcq_shop.shop_id=1dcq_user_shop_comment.shop_id')->field('1dcq_user.mobile,1dcq_shop.shop_name,1dcq_order.order_id,1dcq_user_shop_comment.comment_id,1dcq_user_shop_comment.comment_status,1dcq_user_shop_comment.env_grade,1dcq_user_shop_comment.service_grade,1dcq_user_shop_comment.comment_content,1dcq_user_shop_comment.comment_time');
$payments = select_table($arraylist, $where, I('pageNumber'), 5);
$this->assign('payments', $payments);
//保存分页信息
$this->assign('name', $name);
$this->assign('comment_time', $comment_time);
$this->display();
}
示例12: index_send
public function index_send()
{
$user_type = I('user_type');
$tip = I('tip');
if (!empty($user_type)) {
$where['target_user_type'] = array('eq', $user_type);
}
if (!empty($tip)) {
$where['msg_desc'] = array('like', "%{$tip}%");
}
$where['msg_type'] = array('eq', 1);
//$where['pub_user_id'] = array('eq',$this->aid);
$table = M('message')->alias('a')->join('left join ' . C("DB_PREFIX") . 'province as b on b.province_id = a.province_id')->join('left join ' . C("DB_PREFIX") . 'city as c on c.city_id = a.city_id')->join('left join ' . C("DB_PREFIX") . 'district as d on d.district_id = a.district_id')->join('left join ' . C("DB_PREFIX") . 'town as e on e.town_id = a.town_id')->order('pub_time desc');
//->field('province_name,city_name,district_name,town_name')
$list = select_table($table, $where, I('pageNumber'));
//print_r($list);
$notice = $this->notice();
$this->assign('list', $list);
$this->assign('notice', $notice);
$this->display();
}
示例13: index
public function index()
{
$userstatus = $_REQUEST['userstatus'];
//会员状态
$time = $_REQUEST['time'];
//时间段
$account = $_REQUEST['account'];
//账号
if ($userstatus == 50) {
$where['1dcq_user_feedback.phone'] = array('neq', " ");
}
if ($userstatus != 50 && $userstatus != "") {
$where['1dcq_user.user_type'] = array('eq', $userstatus);
}
if (!empty($account)) {
$where['1dcq_user.username'] = array('eq', $account);
}
if (!empty($time)) {
$timelist = explode("-", $time);
$time1 = date('Y-m-d H:i:s', strtotime($timelist[0]));
$time2 = date('Y-m-d 23:59:59', strtotime($timelist[1]));
$where['1dcq_user_feedback.create_time'] = array('between', array($time1, $time2));
}
$table = M('user_feedback')->join("LEFT JOIN 1dcq_user on 1dcq_user_feedback.user_id=1dcq_user.user_id")->field('1dcq_user_feedback.*,1dcq_user.username,1dcq_user.true_name,1dcq_user.user_type,1dcq_user.mobile')->order('1dcq_user_feedback.feedback_id desc');
$list = select_table($table, $where, $_REQUEST['pageNumber']);
//分页数据
$where['handle_status'] = array('eq', 0);
//未处理状态
//查询未处理条数
$countfee = M('user_feedback')->join("LEFT JOIN 1dcq_user on 1dcq_user_feedback.user_id=1dcq_user.user_id")->where($where)->count();
$this->assign('feecount', $countfee);
foreach ($list['data'] as &$value) {
$value['feedback'] = str_replace(array("\r\n", "\r", "\n", " "), "", $value['feedback']);
}
$this->assign('fee', $list);
$this->display('showFeedback');
}
示例14: user_list
public function user_list()
{
$order_id = $_REQUEST['order_id'];
$time = $_REQUEST['time'];
$type_time = $_REQUEST['type_time'];
$user_id = $_REQUEST['user_id'];
$refer_user_id = $_REQUEST['refer_user_id'];
if (!empty($order_id)) {
$where_bill['order_id'] = array('eq', $order_id);
}
if (!empty($time)) {
$time = explode('-', $time);
$where_bill['create_time'] = array('BETWEEN', date('Y-m-d H:i:s', strtotime($time[0])), date('Y-m-d H:i:s', strtotime($time[1])));
}
if (!empty($type_time)) {
switch ($type_time) {
case '1':
//本月
$where_bill['settle_time'] = array('BETWEEN', array(date('Y-m', time()) . '-01 00:00:00', date('Y-m', time()) . '-31 23:59:59'));
break;
case '2':
//近3个月
$ti = find_createtime(4);
$where_bill['settle_time'] = array('BETWEEN', array(date('Y-m-d H:i:s', $ti['createtime'][0]), date('Y-m-d H:i:s', $ti['createtime'][1])));
break;
case '3':
//近一年
$ti = find_createtime(5);
$where_bill['settle_time'] = array('BETWEEN', array(date('Y-m-d H:i:s', $ti['createtime'][0]), date('Y-m-d H:i:s', $ti['createtime'][1])));
break;
}
}
$where_bill['user_id'] = array('eq', $user_id);
$where_bill['user_ref_share_user_id'] = array('eq', $refer_user_id);
$table = M('order')->alias('a')->field('a.shop_serve_share_price,a.order_id,a.settle_time as create_time,(select mobile from ' . C("DB_PREFIX") . 'user where user_id = a.user_id),a.order_total_price,a.user_ref_share_price,(select shop_name from ' . C("DB_PREFIX") . 'shop where shop_id = a.shop_id) as shop_name
,(select (select city_name from ' . C("DB_PREFIX") . 'city where city_id = sp.city_id) from ' . C("DB_PREFIX") . 'shop as sp where sp.shop_id = a.shop_id) as city_name
,(select (select column_name from ' . C("DB_PREFIX") . 'column where column_id = sp.column_id) from ' . C("DB_PREFIX") . 'shop as sp where sp.shop_id = a.shop_id) as column_name
')->order('a.settle_time desc');
$list_bill = select_table($table, $where_bill, $_REQUEST['pageNumber']);
$total = M('order')->where($where_bill)->sum('user_ref_share_price');
//推荐总收益
if (!$total) {
$total = 0;
}
$this->assign('mobile', M('user')->where(array('user_id' => array('eq', $refer_user_id)))->getField('mobile'));
$this->assign('total', $total);
$this->assign('list', $list_bill);
$id = $_GET['shop_id'];
$shopModel = M('Shop');
$where = array();
if ($id) {
$where['shop_id'] = $id;
}
$data = $shopModel->where($where)->find();
$this->assign('shop', $data);
$this->assign('search_order_id', $order_id);
$this->display();
}
示例15: showKfCate
/**
* 客服分类信息
*/
public function showKfCate()
{
/***************************************************************************************/
//APP端分类信息
$table = M('help_info_category')->order('category_index');
$tablelist = select_table($table, '', $_REQUEST['pageNumber'], 10);
//分页数据
$this->assign('cateinfo', $tablelist);
/*=====================================================================================*/
$this->display('showKfCategory');
}