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


PHP ConnectionFactory::getAssociativeArray方法代码示例

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


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

示例1: getdeviceTokenAndSendMessage

}
function getdeviceTokenAndSendMessage($udid, $message)
{
    echo "UDID = " . $udid;
    $query = "select apns_devices.pid, apns_devices.devicetoken from apns_devices WHERE apns_devices.deviceuid = '" . $udid . "'";
    $devices = ConnectionFactory::SelectRowsAsClasses($query, array(), __CLASS__);
    print_r($device);
    die;
    //$inactiveUsers = User::lastTwoDayInactive();
    foreach ($devices as $device) {
        echo "DEVICE TOKEN = " . $device->devicetoken;
        sendMessageToDevice($device->devicetoken, $message);
    }
}
$query = "select apns_devices.pid, apns_devices.devicetoken from apns_devices ";
$devices = ConnectionFactory::getAssociativeArray($query);
//$inactiveUsers = User::lastTwoDayInactive();
foreach ($devices as $device) {
    sendMessage($device['devicetoken']);
}
//    $conditions = array();
//
//   // $conditions['deviceuid'] = $user['udid'];
//    $deviceToken = ConnectionFactory::getAssociativeArray('devicetoken', 'apns_devices', $conditions);
//    echo $deviceToken;
//    if($userPid>0){
//        sendMessage(sendMessage);
////        $apns->newMessage($userPid);
////        $apns->addMessageAlert("You didn'nt login from last two days");
////        $apns->queueMessage();
//    }
开发者ID:ng2k12,项目名称:MercInc,代码行数:31,代码来源:send_push_notifications.php

示例2: resetTimer

 public static function resetTimer($user_id)
 {
     $query = "update user_timers set stamina_timer = NOW(), health_timer = NOW(), energy_timer = NOW() Where user_id = " . $user_id;
     if (ConnectionFactory::getAssociativeArray($query)) {
         return true;
     }
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:7,代码来源:UserTimers.php

示例3: updateIncomeOfflineTimer

 public function updateIncomeOfflineTimer()
 {
     $query = "Select users.cash + ((users.income - users.upkeep ) * TIMESTAMPDIFF(HOUR, user_timers.health_timer, NOW())) as CASH\n                        from users, user_timers\n                        WHERE users.id = user_timers.user_id AND TIMESTAMPDIFF(HOUR, user_timers.income_timer, NOW()) > 1";
     //echo $query;
     if (ConnectionFactory::getAssociativeArray($query)) {
         return true;
     }
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:8,代码来源:User.php


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