function getUrl($iLimit = 100) { $oConn = $this->getConn(URL_DB); $sSql = "select\n\t\t\t\t\t url_id\n\t\t\t\t\t,url\n\t\t\t\t\tfrom m_url\n\t\t\t\t\twhere status = " . URL_STATUS_WAIT . "\n\t\t\t\t\toffset 0 limit " . $iLimit . "\n\t\t\t\t\tfor update"; if ($oConn->executeSelect($sSql) === FALSE) { // エラー処理 $this->_oConnMng->execErrorOccurs(); } // URLデータ取得 $aUrlHeader = arrary(); $aTargetId = arrary(); while (($rtn = $oConn->fetch()) !== FALSE) { $aUrlHeader[] = $rtn; $aTargetId[] = $rtn['url_id']; } // ステータス変更 $this->updateUrlStatus($aTargetId, URL_STATUS_NOW); return $aUrlHeader; }
/** * @return Cate */ static function getNewsCate() { return Cate::model()->find('alias = ?', arrary('news')); }