zoukankan      html  css  js  c++  java
  • PHP

    public function listAllMagazine($firstRow = 0, $listRows = 20) {
            $C = M("Contents");
            $M = M("Magazines");
            $list = $C->field("`path`,`title`,`publish_data`,`magazine_id`")->order("`publish_data` DESC")->where("`type` = 0")->limit(10)->select();
            // 开始遍历从content表中找到的数据,自己补充上title为空的行
            foreach ($list as &$value) {
            	if (empty($value['title'])) {
            		$condition = $value["magazine_id"];
            		$tmp = $M->where("`id` = $condition")->select();
            		$value['title'] = $tmp[0]['title'];
            	}
            }
            
            return $list;
        }
    

      

  • 相关阅读:
    bzoj1098 1301
    bzoj3237
    bzoj3170
    bzoj4008
    一些题解
    bzoj4028
    bzoj3196
    redis学习
    quartz学习
    电商618 压测、优化、降级预案
  • 原文地址:https://www.cnblogs.com/taxus/p/3270397.html
Copyright © 2011-2022 走看看