예제 #1
0
파일: Log.php 프로젝트: huang-sh/yaf.app
 /**
  * 写入日志到日志表
  *
  * @access public
  * @param array $log
  * @return bool|int
  */
 public function add($log)
 {
     $tablename = Application::app()->getConfig()->application->queue->log->tablename;
     $table = Factory::table($tablename);
     $table->insert($log);
     $lastInsertValue = $table->getLastInsertValue();
     if ($lastInsertValue) {
         return $lastInsertValue;
     } else {
         return false;
     }
 }
예제 #2
0
파일: user.php 프로젝트: EdenYi/demo
 /**
  * 用户头像
  */
 public function updateThumb($params)
 {
     return Factory::table('member')->get(array('id' => $params['memberid']))->mergeData(array('thumb' => $params['thumb']))->save();
 }