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


PHP DBQuery::getInstance方法代码示例

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


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

示例1: saveInDatabase

 /**
  * Save the data in the database
  * 
  * @param PlentySoapObject_SearchOrders $Item
  */
 private function saveInDatabase($Item)
 {
     $query = 'REPLACE INTO `plenty_OrderHead` ' . DBUtils::buildInsert(array('OrderID' => $Item->OrderHead->OrderID, 'Currency' => $Item->OrderHead->Currency, 'CustomerID' => $Item->OrderHead->CustomerID, 'CustomerReference' => $Item->OrderHead->CustomerReference, 'DeliveryAddressID' => $Item->OrderHead->DeliveryAddressID, 'DoneTimestamp' => $Item->OrderHead->DoneTimestamp, 'DunningLevel' => $Item->OrderHead->DunningLevel, 'EbaySellerAccount' => $Item->OrderHead->EbaySellerAccount, 'EstimatedTimeOfShipment' => $Item->OrderHead->EstimatedTimeOfShipment, 'ExchangeRatio' => $Item->OrderHead->ExchangeRatio, 'ExternalOrderID' => $Item->OrderHead->ExternalOrderID, 'Invoice' => $Item->OrderHead->Invoice, 'IsNetto' => $Item->OrderHead->IsNetto, 'LastUpdate' => $Item->OrderHead->LastUpdate, 'MethodOfPaymentID' => $Item->OrderHead->MethodOfPaymentID, 'OrderStatus' => $Item->OrderHead->OrderStatus, 'OrderTimestamp' => $Item->OrderHead->OrderTimestamp, 'OrderType' => $Item->OrderHead->OrderType, 'PackageNumber' => $Item->OrderHead->PackageNumber, 'PaidTimestamp' => $Item->OrderHead->PaidTimestamp, 'ParentOrderID' => $Item->OrderHead->ParentOrderID, 'PaymentStatus' => $Item->OrderHead->PaymentStatus, 'ReferrerID' => $Item->OrderHead->ReferrerID, 'RemoteIP' => $Item->OrderHead->RemoteIP, 'ResponsibleID' => $Item->OrderHead->ResponsibleID, 'SalesAgentID' => $Item->OrderHead->SalesAgentID, 'SellerAccount' => $Item->OrderHead->SellerAccount, 'ShippingCosts' => $Item->OrderHead->ShippingCosts, 'ShippingID' => $Item->OrderHead->ShippingID, 'ShippingMethodID' => $Item->OrderHead->ShippingMethodID, 'ShippingProfileID' => $Item->OrderHead->ShippingProfileID, 'StoreID' => $Item->OrderHead->StoreID, 'TotalBrutto' => $Item->OrderHead->TotalBrutto, 'TotalInvoice' => $Item->OrderHead->TotalInvoice, 'TotalNetto' => $Item->OrderHead->TotalNetto, 'TotalVAT' => $Item->OrderHead->TotalVAT, 'WarehouseID' => $Item->OrderHead->WarehouseID));
     $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     DBQuery::getInstance()->replace($query);
     if (isset($Item->OrderHead->IncomingPayments)) {
         foreach ($Item->OrderHead->IncomingPayments->item as $ItemIncomingPayments) {
             $query = 'REPLACE INTO `plenty_OrderHead_IncomingPayments` ' . DBUtils::buildInsert(array('ID' => $ItemIncomingPayments->ID, 'ReferenceID' => $ItemIncomingPayments->ReferenceID, 'OrderID' => $Item->OrderHead->OrderID));
             $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
             DBQuery::getInstance()->replace($query);
         }
     }
     if (isset($Item->OrderHead->IncomingPayments)) {
         foreach ($Item->OrderHead->IncomingPayments->item as $ItemIncomingPayments) {
             $query = 'REPLACE INTO `plenty_OrderHead_IncomingPayments` ' . DBUtils::buildInsert(array('ID' => $ItemIncomingPayments->ID, 'ReferenceID' => $ItemIncomingPayments->ReferenceID, 'OrderID' => $Item->OrderHead->OrderID));
             $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
             DBQuery::getInstance()->replace($query);
         }
     }
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:25,代码来源:SoapCall_GetNewOrders.class.php

示例2: saveInDatabase

 /**
  * Save the data in the database
  *
  * @param PlentySoapObject_GetMethodOfPayments $methodOfPayment
  */
 private function saveInDatabase($methodOfPayment)
 {
     $activeCountriesOfDelivery = array();
     $activeMultishops = array();
     /*
      * parse all active countries of delivery in a string
      */
     if (is_array($methodOfPayment->ActiveCountriesOfDelivery->item)) {
         foreach ($methodOfPayment->ActiveCountriesOfDelivery->item as $countryOfDelivery) {
             $activeCountriesOfDelivery[] = $countryOfDelivery->intValue;
         }
     } elseif (is_object($methodOfPayment->ActiveCountriesOfDelivery->item)) {
         $activeCountriesOfDelivery[] = $methodOfPayment->ActiveCountriesOfDelivery->item->intValue;
     }
     /*
      * parse all active multishops in a string
      */
     if (is_array($methodOfPayment->Multishops->item)) {
         foreach ($methodOfPayment->ActiveCountriesOfDelivery->item as $multishops) {
             $activeMultishops[] = $multishops->intValue;
         }
     } elseif (is_object($methodOfPayment->Multishops->item)) {
         $activeMultishops[] = $methodOfPayment->Multishops->item->intValue;
     }
     $query = 'REPLACE INTO `plenty_method_of_payments` ' . DBUtils::buildInsert(array('method_of_payment_id' => $methodOfPayment->MethodOfPaymentID, 'method_of_payment_name' => $methodOfPayment->Name, 'active_countries' => implode(',', $activeCountriesOfDelivery), 'active_multishops' => implode(',', $activeMultishops)));
     $this->getLogger()->debug(__FUNCTION__ . ' new MOP ' . $methodOfPayment->MethodOfPaymentID . ' ' . $methodOfPayment->Name);
     DBQuery::getInstance()->replace($query);
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:33,代码来源:SoapCall_GetMethodOfPayments.class.php

示例3: truncateTable

 /**
  * delete existing data
  */
 private function truncateTable()
 {
     DBQuery::getInstance()->truncate('TRUNCATE plenty_vat_config');
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:7,代码来源:Adapter_GetVATConfig.class.php

示例4: saveInDatabase

 /**
  * Save the data in the database
  *
  * @param PlentySoapObject_GetWarehouseList $warehouse
  */
 private function saveInDatabase($warehouse)
 {
     $query = 'REPLACE INTO `plenty_warehouse` ' . DBUtils::buildInsert(array('warehouse_id' => $warehouse->WarehouseID, 'warehouse_type' => $warehouse->Type, 'warehouse_name' => $warehouse->Name));
     $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     DBQuery::getInstance()->replace($query);
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:11,代码来源:SoapCall_GetWarehouseList.class.php

示例5: loadToken

    /**
     * load existing token from db or file
     * 
     * @param string $soapUser
     * @return array
     */
    public function loadToken($soapUser)
    {
        if (self::SAVE_TOKEN_IN_DB === true) {
            $query = 'SELECT `soap_token_user_id`, `soap_token` 
						FROM `plenty_soap_token`
						WHERE `soap_token_user`="' . $soapUser . '" && DAY(`soap_token_inserted`)=DAY(NOW())';
            //$this->getLogger()->debug(__FUNCTION__.' '.$query);
            $result = DBQuery::getInstance()->selectAssoc($query);
            if (isset($result['soap_token_user_id'])) {
                return array($result['soap_token_user_id'], $result['soap_token']);
            }
        } else {
            $token = array();
            if (is_file($this->dest)) {
                require $this->dest;
                if (isset($token[$soapUser]) && $token[$soapUser]['inserted'] == strtotime('today')) {
                    return array($token[$soapUser]['userId'], $token[$soapUser]['usertoken']);
                }
            }
        }
        return array();
    }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:28,代码来源:StoreToken.class.php

示例6: saveCurrentTimestamp2DB4TheNextRetrieval

 /**
  * Save $this->currentTimestamp in plenty_stock_last_update
  *
  */
 private function saveCurrentTimestamp2DB4TheNextRetrieval()
 {
     if ($this->warehouseId > 0) {
         $query = 'REPLACE INTO plenty_stock_last_update ' . DBUtils::buildInsert(array('warehouse_id' => $this->warehouseId, 'last_update_timestamp' => $this->currentTimestamp));
         DBQuery::getInstance()->replace($query);
         $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     }
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:12,代码来源:Adapter_GetCurrentStocks.class.php

示例7: saveInDatabase

 /**
  * save the data in the database
  * 
  * @param PlentySoapObject_GetVatConfig $vatConfig
  * @param integer $countryId
  */
 private function saveInDatabase($vatConfig, $countryId)
 {
     $query = 'REPLACE INTO `plenty_vat_config` ' . DBUtils::buildInsert(array('country_id' => $countryId, 'vat_id' => $vatConfig->InternalVATID, 'vat_value' => $vatConfig->VATValue));
     $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     DBQuery::getInstance()->replace($query);
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:12,代码来源:SoapCall_GetVATConfig.class.php

示例8: saveInDatabase

 /**
  * Save the data in the database
  * 
  * @param PlentySoapObject_GetCountriesOfDelivery $countryOfDelivery
  */
 private function saveInDatabase($countryOfDelivery)
 {
     $query = 'REPLACE INTO `plenty_countries_of_delivery` ' . DBUtils::buildInsert(array('country_id' => $countryOfDelivery->CountryID, 'active' => $countryOfDelivery->CountryActive, 'country_name' => $countryOfDelivery->CountryName, 'iso_code_2' => $countryOfDelivery->CountryISO2));
     $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     DBQuery::getInstance()->replace($query);
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:11,代码来源:SoapCall_GetCountriesOfDelivery.class.php

示例9: quoteSmart

 /**
  * 
  * 
  * @param mixed $mValue
  * @param boolean $bDontStripSlashes
  * 
  * @return mixed
  */
 public static function quoteSmart($mValue)
 {
     if (is_object($mValue) || is_array($mValue)) {
         return self::quoteSmartObject($mValue);
     }
     if ($mValue == '""') {
         return "";
     }
     /*
      * Quote if not numeric
      */
     if (!is_numeric($mValue)) {
         if (!self::$DBQuery instanceof DBQuery) {
             self::$DBQuery = DBQuery::getInstance();
         }
         $mValue = self::$DBQuery->escapeString($mValue);
     }
     return $mValue;
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:27,代码来源:DBUtils.class.php

示例10: saveInDatabase

 /**
  * Save the data in the database
  *
  * @param PlentySoapObject_GetOrderStatus $orderStatus
  */
 private function saveInDatabase($orderStatus)
 {
     $query = 'REPLACE INTO `plenty_order_status` ' . DBUtils::buildInsert(array('order_status' => $orderStatus->OrderStatus, 'lang' => $this->sLang, 'status_name' => $orderStatus->OrderStatusName));
     $this->getLogger()->debug(__FUNCTION__ . ' ' . $query);
     DBQuery::getInstance()->replace($query);
 }
开发者ID:PhDasen,项目名称:php_soap_client_mu,代码行数:11,代码来源:SoapCall_GetOrderStatusList.class.php


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