当前位置: 首页>>代码示例>>PHP>>正文


PHP fRecordSet::build方法代码示例

本文整理汇总了PHP中fRecordSet::build方法的典型用法代码示例。如果您正苦于以下问题:PHP fRecordSet::build方法的具体用法?PHP fRecordSet::build怎么用?PHP fRecordSet::build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fRecordSet的用法示例。


在下文中一共展示了fRecordSet::build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 public function show()
 {
     $this->editable = UserHelper::isEditor();
     $cons = array();
     $field = trim(fRequest::get('field'));
     $start_year = trim(fRequest::get('start_year'));
     $major = trim(fRequest::get('major'));
     $location = trim(fRequest::get('location'));
     $words = trim(fRequest::get('words'));
     $cons['login_name|display_name~'] = $words;
     if (!empty($field)) {
         $cons['field='] = $field;
     }
     if (!empty($start_year)) {
         $cons['start_year='] = $start_year;
     }
     if (!empty($major)) {
         $cons['major='] = $major;
     }
     if (!empty($location)) {
         $cons['location~'] = $location;
     }
     $this->users = fRecordSet::build('Profile', $cons, array('id' => 'asc'));
     $this->field = $field;
     $this->start_year = $start_year;
     $this->major = $major;
     $this->location = $location;
     $this->words = $words;
     $this->render('search/index');
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:30,代码来源:SearchController.php

示例2: index

 public function index()
 {
     $this->articles = fRecordSet::build('Article', array('type=' => 'news', 'visible=' => 1), array('priority' => 'desc', 'created_at' => 'desc'), ACTIVITIES_LIMIT - 2);
     $this->posts = fRecordSet::build('Article', array('type=' => 'post', 'visible=' => 1, 'priority<' => 999999), array('priority' => 'desc', 'created_at' => 'desc'), ACTIVITIES_LIMIT - 1);
     $this->activities = fRecordSet::buildFromSQL('Activity', 'SELECT activities.* FROM activities GROUP BY realname,type,DATE(timestamp),HOUR(timestamp) ORDER BY timestamp DESC LIMIT ' . ACTIVITIES_LIMIT);
     $this->render('home/index');
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:7,代码来源:HomeController.php

示例3: addInterest

 public function addInterest($name, $category)
 {
     global $db;
     $db->execute("INSERT INTO interests (category,name) VALUES (%s, %s)", $category, $name);
     $record = fRecordSet::build('Interest', array('name=' => $name, 'category=' => $category));
     return $record[0]->getInterestId();
 }
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:7,代码来源:user.php

示例4: showKnown

 public function showKnown()
 {
     if (!UserHelper::isEditor()) {
         throw new fValidationException('not allowed');
     }
     $this->users = fRecordSet::build('Name', array('registered=' => 0), array('student_number' => 'asc'));
     $this->render('users/known');
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:8,代码来源:NameController.php

示例5: findAll

	/**
	 * Returns all checks on the system
	 * 
	 * @param  string  $sort_column  The column to sort by
	 * @param  string  $sort_dir     The direction to sort the column
	 * @return fRecordSet  An object containing all meetups
	 */
	static function findAll($sort_column = 'name', $sort_dir = 'desc')
	{
       return fRecordSet::build(
          __CLASS__,
          array('enabled=' => true,'user_id=|visibility=' => array(fSession::get('user_id'),0)),
          array($sort_column => $sort_dir)
          );
	}    
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:15,代码来源:Check.php

示例6: invalidate

 public static function invalidate($username, $problem_id, $submit_time)
 {
     global $cache;
     $affected_reports = fRecordSet::build('Report', array('problem_list~' => $problem_id, 'user_list~' => $username, 'start_datetime<=' => $submit_time, 'end_datetime>=' => $submit_time));
     foreach ($affected_reports as $report) {
         $cache->delete($report->getBoardCacheKey());
     }
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:8,代码来源:BoardCacheInvalidator.php

示例7: findAll

  /**
	 * Returns all meetups on the system
	 * 
	 * @param  string  $sort_column  The column to sort by
	 * @param  string  $sort_dir     The direction to sort the column
	 * @return fRecordSet  An object containing all meetups
	 */
	static function findAll($graph_id=NULL)
	{
       return fRecordSet::build(
          __CLASS__,
          array('graph_id=' =>$graph_id),
          array()
          );
	}   
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:15,代码来源:Line.php

示例8: findAll

  /**
	 * Returns all meetups on the system
	 *
	 * @param  string  $sort_column  The column to sort by
	 * @param  string  $sort_dir     The direction to sort the column
	 * @return fRecordSet  An object containing all meetups
	 */
	static function findAll($dashboard_id=NULL)
	{
       return fRecordSet::build(
          __CLASS__,
          array('dashboard_id=' =>$dashboard_id),
          array('weight' => 'asc')
          );
	}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:15,代码来源:Graph.php

示例9: findByParams

 /**
  * @param array $where
  * @return WpTesting_Model_AbstractTerm
  * @throws fNotFoundException
  */
 protected function findByParams(array $where = array())
 {
     $taxonomyTable = fORM::tablize('WpTesting_Model_Taxonomy');
     try {
         return fRecordSet::build($this->modelName, array($taxonomyTable . '.taxonomy=' => $this->getTaxonomy()) + $where)->getRecord(0);
     } catch (fNoRemainingException $e) {
         throw new fNotFoundException($this->modelName . ' not found by conditions: ' . var_export($where, true));
     }
 }
开发者ID:pmanterys,项目名称:wp-mw-newsletter,代码行数:14,代码来源:AbstractTerm.php

示例10: ackAll

 static function ackAll($check_id = NULL)
 {
     if (!is_null($check_id) && is_numeric($check_id)) {
         $filter = array('check_id=' => $check_id);
     } else {
         $filter = array();
     }
     return fRecordSet::build(__CLASS__, $filter, array('status' => 'desc'));
 }
开发者ID:nagyist,项目名称:Tattle,代码行数:9,代码来源:CheckResult.php

示例11: findAll

 /**
  * Returns all meetups on the system
  * 
  * @return fRecordSet  An object containing all meetups
  */
 static function findAll($group_id = NULL)
 {
     if (!is_null($group_id) && is_numeric($group_id)) {
         $filter = array('group_id=' => $group_id);
     } else {
         $filter = array();
     }
     return fRecordSet::build(__CLASS__, $filter, array());
 }
开发者ID:nagyist,项目名称:Tattle,代码行数:14,代码来源:Group.php

示例12: findStatus

 static function findStatus($po)
 {
     $records = fRecordSet::build('Good_receipt_note', array('po_no=' => $po));
     if ($records->count() > 1) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:JhunCabas,项目名称:material-management,代码行数:9,代码来源:Good_receipt_note.php

示例13: findAll

	/**
	 * Returns all meetups on the system
	 * 
	 * @param  string  $sort_column  The column to sort by
	 * @param  string  $sort_dir     The direction to sort the column
	 * @return fRecordSet  An object containing all meetups
	 */
	static function findAll()
	{
		
       return fRecordSet::build(
          __CLASS__,
          array(),
          array()
          );
	}    
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:16,代码来源:User.php

示例14: findByMonth

 /**
  * Return entries by month and branch
  *
  * @param string 	$branch	Branch ID to represent a branch 
  * @param int		$month	Specific month as the input
  * @param string	$item	Item code to specify an individual item
  * @return  int	The total movement by month
  */
 static function findByMonth($branch, $month, $item)
 {
     $movements = fRecordSet::build('Inv_movement', array('branch_id=' => $branch, 'date>=' => '2010-' . $month . '-1', 'date<=' => '2010-' . $month . '-31', 'item_id=' => $item));
     if ($movements->count()) {
         return $movements->getRecord(0)->prepareQuantity();
     } else {
         return 0;
     }
 }
开发者ID:JhunCabas,项目名称:material-management,代码行数:17,代码来源:Inv_movement.php

示例15: getContactOrEmpty

 public function getContactOrEmpty($type)
 {
     try {
         $records = fRecordSet::build('Contact', array('profile_id=' => $this->getId(), 'type=' => $type), array(), 1);
         $records->tossIfEmpty();
         return $records->getRecord(0)->getContent();
     } catch (Exception $e) {
         return '';
     }
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:10,代码来源:Profile.php


注:本文中的fRecordSet::build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。