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


PHP DBManager::GetAffectedRowCount方法代码示例

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


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

示例1: UpdateUserStatus

 function UpdateUserStatus($_internalActivated, $_internalClosed, $_internalDeclined, $_externalActivated, $_externalClose)
 {
     if (!empty($this->ChatId)) {
         $this->Status = $_externalClose || $_internalDeclined || $_internalClosed ? CHAT_CLOSED : $this->Status;
         if ($_internalActivated) {
             queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_VISITOR_CHATS . "` SET `internal_active`='1',`allocated`='" . DBManager::RealEscape(time()) . "' WHERE `internal_active`=0 AND `chat_id`='" . DBManager::RealEscape($this->ChatId) . "' LIMIT 1;");
             if (DBManager::GetAffectedRowCount() == 1) {
                 queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_VISITOR_CHAT_OPERATORS . "` SET `status`=0 WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "' AND `user_id`='" . DBManager::RealEscape(CALLER_SYSTEM_ID) . "';");
                 queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_VISITOR_CHAT_OPERATORS . "` SET `status`=9,`ltime`=" . time() . ",`jtime`=0 WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "' AND `user_id`!='" . DBManager::RealEscape(CALLER_SYSTEM_ID) . "' AND `status`<=1;");
             }
         } else {
             if ($_externalClose && empty($this->InternalClosed)) {
                 $update = "`external_close`='1',`exit`='" . DBManager::RealEscape(time() + 1) . "'";
             } else {
                 if ($_externalClose && !empty($this->InternalClosed)) {
                     $update = "`external_close`='1'";
                 } else {
                     if ($_internalClosed && empty($this->InternalClosed)) {
                         $update = "`internal_closed`='1',`exit`='" . DBManager::RealEscape(time() + 1) . "'";
                     } else {
                         if ($_internalDeclined && empty($this->InternalDeclined)) {
                             $update = "`internal_declined`='1'";
                         } else {
                             $update = "`external_active`='1'";
                         }
                     }
                 }
             }
             if (($_internalClosed || $_externalClose) && !empty($this->AllocatedTime)) {
                 UserGroup::RemoveNonPersistantMember($this->SystemId);
                 //queryDB(true,"DELETE FROM `".DB_PREFIX.DATABASE_GROUP_MEMBERS."` WHERE `user_id`='".DBManager::RealEscape($this->SystemId)."';");
                 $params = $this->CalculateChatResponseTime();
                 $update .= ",`response_time`=" . $params[0] . ",`chat_posts`=" . $params[1];
             }
             queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_VISITOR_CHATS . "` SET " . $update . " WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "' LIMIT 1;");
         }
         queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` SET `endtime`=" . $this->LastActive . (!empty($this->AllocatedTime) ? ",`time`=" . $this->AllocatedTime : "") . " WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "' LIMIT 1;");
     }
     if (!empty($this->ChatVoucherId)) {
         $ticket = new CommercialChatVoucher(null, $this->ChatVoucherId);
         $ticket->UpdateVoucherChatTime(0);
     }
 }
开发者ID:elderxavier,项目名称:SII9-CREATIVE-STUDIO,代码行数:43,代码来源:objects.global.users.inc.php

示例2: Save

 function Save()
 {
     $result = DBManager::Execute(true, "INSERT INTO `" . DB_PREFIX . DATABASE_COMMERCIAL_CHAT_VOUCHERS . "` (`id`, `extends`, `tid`, `email`, `info`, `created`, `expires`, `edited`, `chat_sessions_max`, `chat_time_max`,\n\t\t`chat_list`, `visitor_id`, `company`, `tax_id`, `firstname`, `lastname`, `address_1`, `address_2`, `zip`, `state`, `phone`, `city`, `country`, `tn_id`, `price`, `currency`, `vat`, `payment_details`, `language`) \n\t\tVALUES (\n\t\t'" . DBManager::RealEscape($this->Id) . "',\n\t\t'" . DBManager::RealEscape($this->Extends) . "',\n\t\t'" . DBManager::RealEscape($this->TypeId) . "',\n\t\t'" . DBManager::RealEscape($this->Email) . "',\n\t\t'" . DBManager::RealEscape("") . "',\n\t\t'" . DBManager::RealEscape(time()) . "',\n\t\t'" . DBManager::RealEscape(0) . "',\n\t\t'" . DBManager::RealEscape(time()) . "',\n\t\t'" . DBManager::RealEscape($this->ChatSessionsMax) . "',\n\t\t'" . DBManager::RealEscape($this->ChatTimeMax) . "',\n\t\t'" . DBManager::RealEscape(@serialize($this->ChatIdList)) . "',\n\t\t'" . DBManager::RealEscape($this->VisitorId) . "',\n\t\t'" . DBManager::RealEscape($this->Company) . "',\n\t\t'" . DBManager::RealEscape($this->TaxID) . "',\n\t\t'" . DBManager::RealEscape($this->Firstname) . "',\n\t\t'" . DBManager::RealEscape($this->Lastname) . "',\n\t\t'" . DBManager::RealEscape($this->Address1) . "',\n\t\t'" . DBManager::RealEscape($this->Address2) . "',\n\t\t'" . DBManager::RealEscape($this->ZIP) . "',\n\t\t'" . DBManager::RealEscape($this->State) . "',\n\t\t'" . DBManager::RealEscape($this->Phone) . "',\n\t\t'" . DBManager::RealEscape($this->City) . "',\n\t\t'" . DBManager::RealEscape($this->Country) . "',\n\t\t'" . DBManager::RealEscape($this->TransactionId) . "',\n\t\t'" . DBManager::RealEscape($this->Price) . "',\n\t\t'" . DBManager::RealEscape(strtoupper($this->CurrencyISOThreeLetter)) . "',\n\t\t'" . DBManager::RealEscape($this->VAT) . "',\n\t\t'" . DBManager::RealEscape($this->PaymentDetails) . "',\n\t\t'" . DBManager::RealEscape(strtolower($this->Language)) . "');");
     return DBManager::GetAffectedRowCount() == 1;
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:5,代码来源:objects.global.inc.php

示例3: saveRating

function saveRating($_rating, $_chatId)
{
    $time = time();
    while (true) {
        queryDB(true, "SELECT time FROM `" . DB_PREFIX . DATABASE_RATINGS . "` WHERE time=" . DBManager::RealEscape($time) . ";");
        if (DBManager::GetAffectedRowCount() > 0) {
            $time++;
        } else {
            break;
        }
    }
    queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_RATINGS . "` (`id` ,`time` ,`user_id` ,`internal_id` ,`fullname` ,`email` ,`company` ,`qualification` ,`politeness` ,`comment`, `ip`, `chat_id`) VALUES ('" . DBManager::RealEscape($_rating->Id) . "', " . DBManager::RealEscape($time) . " , '" . DBManager::RealEscape($_rating->UserId) . "', '" . DBManager::RealEscape($_rating->InternId) . "', '" . DBManager::RealEscape($_rating->Fullname) . "', '" . DBManager::RealEscape($_rating->Email) . "', '" . DBManager::RealEscape($_rating->Company) . "', '" . DBManager::RealEscape($_rating->RateQualification) . "', '" . DBManager::RealEscape($_rating->RatePoliteness) . "', '" . DBManager::RealEscape($_rating->RateComment) . "', '" . DBManager::RealEscape(getIP()) . "', '" . DBManager::RealEscape($_chatId) . "');");
}
开发者ID:elderxavier,项目名称:SII9-CREATIVE-STUDIO,代码行数:13,代码来源:functions.external.inc.php


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