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


PHP Flight::aod方法代码示例

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


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

示例1: findByDivision

 public static function findByDivision($game_id, $limit = false)
 {
     if (!$limit) {
         $limit = 10;
     }
     return arrayToObject(Flight::aod()->from(self::$table)->where(array("member.game_id" => $game_id))->limit($limit)->sortDesc('date')->join('actions', array('actions.id' => 'user_actions.type_id'))->join('member', array('member.member_id' => 'user_actions.target_id'))->select(array('date', 'user_id', 'type_id', 'target_id', 'verbage', 'icon'))->many());
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:7,代码来源:UserAction.php

示例2: delete

 public static function delete($id)
 {
     $pt = self::find(array('id' => $id));
     if (count($pt)) {
         Flight::aod()->remove($pt);
     }
     return (bool) Flight::aod()->affected_rows;
 }
开发者ID:higginsd,项目名称:Division-Tracker,代码行数:8,代码来源:PartTime.php

示例3: findSquadMembers

 public static function findSquadMembers($squad_id, $div_struc_sort = false, $recruiter = false)
 {
     $conditions = $recruiter ? array('squad_id' => $squad_id, 'position_id' => 6, 'recruiter !%' => $recruiter, 'status_id @' => array(1, 3, 999)) : array('squad_id' => $squad_id, 'position_id' => 6, 'status_id @' => array(1, 3, 999));
     if ($div_struc_sort) {
         return Flight::aod()->from(Member::$table)->where($conditions)->sortDesc('rank_id')->sortAsc('forum_name')->many();
     } else {
         return Flight::aod()->from(Member::$table)->where($conditions)->sortAsc('last_activity')->many();
     }
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:9,代码来源:Squad.php

示例4: findHandle

 public static function findHandle($member_id, $type)
 {
     $params = Flight::aod()->using('MemberHandle')->where(array('member_id' => $member_id, 'handle_type' => $type))->find();
     if (is_object($params)) {
         $handle = Handle::findByType($params->handle_type);
         $params->handle_name = $handle->type;
         $params->name = $handle->name;
         $params->isInvalid = (bool) $params->invalid;
         $params->isVisible = (bool) $handle->show_on_profile;
         if (!is_null($handle->url)) {
             $params->url = $handle->url;
         }
     }
     return $params;
 }
开发者ID:higginsd,项目名称:Division-Tracker,代码行数:15,代码来源:MemberHandle.php

示例5: _doBattlelogIdUpdate

function _doBattlelogIdUpdate()
{
    $members = array();
    $battlelog_names = objectToArray(Member::find(array('status_id' => 1, 'battlelog_name !%' => 0, 'battlelog_id' => 0)));
    $countNames = count($battlelog_names);
    echo "Fetched battlelog names. ({$countNames})<br /><br />";
    foreach ($battlelog_names as $row) {
        $battlelog_id = Member::getBattlelogId($row['battlelog_name']);
        if (!$battlelog_id['error']) {
            $sql = "UPDATE member SET battlelog_id = {$battlelog_id['id']} WHERE battlelog_name = '{$row['battlelog_name']}'";
            Flight::aod()->sql($sql)->one();
            echo "Added ID {$battlelog_id['id']} to {$row['battlelog_name']}<br />";
        } else {
            echo "ERROR: {$row['battlelog_name']} - {$battlelog_id['message']}<br />";
        }
    }
    echo "done syncing battlelog ids.";
}
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:18,代码来源:lib.php

示例6: remove

 public static function remove($member_id)
 {
     $flag = self::find(array('member_id' => $member_id));
     Flight::aod()->remove($flag);
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:5,代码来源:InactiveFlagged.php

示例7: findAll

 public static function findAll($game_id)
 {
     return Flight::aod()->using('RecruitingTask')->where(array('game_id @' => array(0, $game_id)))->sortDesc('game_id')->sortAsc('sort_order')->find();
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:4,代码来源:RecruitingTask.php

示例8: modify

 public static function modify($params)
 {
     $member = new self();
     foreach ($params as $key => $value) {
         $member->{$key} = $value;
     }
     $member->update($params);
     return Flight::aod()->affected_rows;
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:9,代码来源:Member.php

示例9: resetValidation

 public static function resetValidation($email)
 {
     $user = self::find(array('email' => $email));
     if (empty($user)) {
         return false;
     } else {
         $user->validation = md5(time() . rand());
         $user->validated = 0;
         Flight::aod()->save($user);
         Email::validate($user);
         return true;
     }
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:13,代码来源:User.php

示例10: recruitingByTheMonth

 public static function recruitingByTheMonth($game_id)
 {
     $sql = "SELECT DATE(DATE_FORMAT(date, '%Y-%m-01')) AS month_beginning, count( * ) AS count\n\t\t\t\tFROM user_actions\n\t\t\t\tJOIN member ON member.member_id = user_actions.user_id\n\t\t\t\tWHERE member.game_id = {$game_id}\n\t\t\t\tAND date > DATE_SUB(NOW(), INTERVAL 4 MONTH)\n\t\t\t\tAND type_id = 1\n\t\t\t\tGROUP BY DATE(DATE_FORMAT(date, '%Y-%m-01'))\n\t\t\t\tORDER BY DATE(DATE_FORMAT(date, '%Y-%m-01'))";
     $params = Flight::aod()->sql($sql)->many();
     return objectToArray($params);
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:6,代码来源:Report.php

示例11: findByName

 public static function findByName($name, $game_id)
 {
     $data = Flight::aod()->using('RecruitingString');
     return $data->find(['name' => $name, 'game_id' => $game_id]);
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:5,代码来源:RecruitingString.php

示例12: delete

 public static function delete($id)
 {
     $pt = self::find($id);
     Flight::aod()->remove($pt);
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:5,代码来源:PartTime.php

示例13: foreach

    echo $js;
    ?>
.js"></script>
<?php 
}
if (!empty($extrajs) && is_array($extrajs)) {
    foreach ($extrajs as $js) {
        if (isset($js) && file_exists("assets/js/{$js}.js")) {
            ?>
        <script src="assets/js/<?php 
            echo $js;
            ?>
.js"></script>
    <?php 
        }
    }
}
?>

<?php 
// debug information
if (isset($_SESSION['userid'])) {
    Flight::aod()->show_sql = true;
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
}
?>

</body>
</html>
开发者ID:higginsd,项目名称:Division-Tracker,代码行数:30,代码来源:application.php

示例14: get_number_from_id

 public static function get_number_from_id($platoon_id)
 {
     $sql = "SELECT number FROM " . Platoon::$table . " WHERE id = {$platoon_id}";
     $params = Flight::aod()->sql($sql)->one();
     return $params['number'];
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:6,代码来源:Platoon.php

示例15: find_all

 /**
  * fetch all alerts not seen by user
  * @return array array of alerts
  */
 public static function find_all($user)
 {
     $sql = "SELECT DISTINCT * FROM " . self::$table . " WHERE start_date < CURRENT_TIMESTAMP AND end_date > CURRENT_TIMESTAMP AND NOT EXISTS ( SELECT * FROM " . AlertStatus::$table . " WHERE alert_id = alerts.id AND user_id = {$user} )";
     $params = Flight::aod()->sql($sql)->many();
     return arrayToObject($params);
 }
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:10,代码来源:Alert.php


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