/** * 根据某一栏目获取同级栏目 * @param type $info * @return type */ public function tongJi($info) { if (empty($info)) { return false; } $cacheKey = "getTongJiColum_{$info['id']}"; $items = zmf::getCache($cacheKey); if ($items) { return $items; } if ($info['theorder'] == 1) { $theorder = 1; } else { $theorder = $info['theorder']; } $sql = "SELECT id,title FROM {{area}} WHERE theorder={$theorder} AND status=" . Posts::STATUS_PASSED . " AND belongid={$info['belongid']}"; $items = Yii::app()->db->createCommand($sql)->queryAll(); zmf::setCache($cacheKey, $items, 86400); return $items; }