• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fRecordSet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


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


示例17: hasParent

 public static function hasParent($category_id, $region = 0)
 {
     $category = fRecordSet::build(__CLASS__, array('id_category=' => $category_id, 'id_region=' => $region));
     $category = $category[0];
     if ($category->getIdParent() > 0) {
         return $category->getIdParent();
     } else {
         return $category->getIdCategory();
     }
 }
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:10,代码来源:category.php


示例18: fetchFromDB

 private static function fetchFromDB($user_name, $permission_name)
 {
     if (!array_key_exists($user_name, self::$permission_cache)) {
         self::$permission_cache[$user_name] = array();
         $permissions = fRecordSet::build('Permission', array('user_name=' => $user_name));
         foreach ($permissions as $permission) {
             self::$permission_cache[$user_name][] = $permission->getPermissionName();
         }
     }
     return in_array($permission_name, self::$permission_cache[$user_name]);
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:11,代码来源:Permission.php


示例19: fillSteps

 protected function fillSteps()
 {
     $questions = $this->test->buildQuestions();
     $total = $questions->count();
     $answered = $this->answeredQuestions->count();
     foreach ($questions as $q => $question) {
         $records = fRecordSet::buildFromArray('WpTesting_Model_Question', array($q => $question));
         $isCurrent = $answered == $q;
         $this->addStep(new WpTesting_Model_Step('', $records), $isCurrent);
     }
     return $this->enableStepsCounter();
 }
开发者ID:pmanterys,项目名称:wp-mw-newsletter,代码行数:12,代码来源:OneToOne.php


示例20: halloffames

 public function halloffames()
 {
     $this->editable = UserHelper::isEditor();
     if ($this->editable) {
         $this->articles = fRecordSet::build('Article', array('type=' => 'halloffame'), array('priority' => 'desc', 'created_at' => 'asc'));
     } else {
         $this->articles = fRecordSet::build('Article', array('type=' => 'halloffame', 'visible=' => 1), array('priority' => 'desc', 'created_at' => 'asc'));
     }
     $this->title = "校友风采";
     $this->articleType = "halloffame";
     $this->render('article/index');
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:12,代码来源:ArticleController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fRequest类代码示例发布时间:2022-05-23
下一篇:
PHP fORMSchema类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap