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


PHP fRecordSet类代码示例

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


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

示例1: findActive

	/**
	 * Returns all active 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 findActive()
	{
       return fRecordSet::buildFromSQL(
          __CLASS__,
          array("SELECT checks.* FROM checks JOIN subscriptions ON checks.check_id = subscriptions.check_id WHERE enabled = 1;")
          );
	}    
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:14,代码来源:Check.php

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例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: 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

示例8: findByBranch

 public static function findByBranch($branch, $doctype)
 {
     //return fRecordSet::buildFromSQL('Production_issue',
     //		"SELECT production_issues.* FROM production_issues, (SELECT * FROM users WHERE branch_id = '$branch') AS tbl WHERE production_issues.issuer = tbl.username AND production_issues.doc_type = '$doctype' AND YEAR( production_issues.doc_date ) = YEAR( CURDATE( ) ) AND MONTH( production_issues.doc_date ) = MONTH( CURDATE( ))",
     //		"SELECT count(*) FROM production_issues"
     //	);
     return fRecordSet::buildFromSQL('Production_issue', "SELECT production_issues.* FROM production_issues WHERE production_issues.doc_number LIKE '" . $doctype . "/" . $branch . "/" . "%" . "' AND YEAR( production_issues.doc_date ) = YEAR( CURDATE( ) ) AND MONTH( production_issues.doc_date ) = MONTH( CURDATE( ) )", "SELECT count(*) FROM production_issues");
 }
开发者ID:JhunCabas,项目名称:material-management,代码行数:8,代码来源:Production_issue.php

示例9: 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

示例10: 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

示例11: findActive

 static function findActive($check_id = NULL)
 {
     if (!is_null($check_id) && is_numeric($check_id)) {
         $filter = ' AND check_id=' . $check_id;
     } else {
         $filter = '';
     }
     return fRecordSet::buildFromSQL(__CLASS__, array('SELECT subscriptions.* FROM subscriptions WHERE user_id = ' . fSession::get('user_id') . $filter));
 }
开发者ID:nagyist,项目名称:Tattle,代码行数:9,代码来源:Subscription.php

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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