本文整理汇总了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();
// }
示例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;
}
}
示例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;
}
}