當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ConnectionManager::closeConnection方法代碼示例

本文整理匯總了PHP中ConnectionManager::closeConnection方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConnectionManager::closeConnection方法的具體用法?PHP ConnectionManager::closeConnection怎麽用?PHP ConnectionManager::closeConnection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ConnectionManager的用法示例。


在下文中一共展示了ConnectionManager::closeConnection方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: truncate

 function truncate()
 {
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("TRUNCATE TABLE free_delivery_price");
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:8,代碼來源:FdpManager.php

示例2: getUnusedCreditListByReceiverId

 function getUnusedCreditListByReceiverId($receiver_id)
 {
     $creditList = [];
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("SELECT sender_id, receiver_id FROM credit_history WHERE receiver_id = ? AND status = false");
     $stmt->bind_param("s", $receiver_id);
     $stmt->execute();
     $stmt->bind_result($sender_id, $receiver_id);
     while ($stmt->fetch()) {
         $credit = [];
         $credit["sender_id"] = $sender_id;
         $credit["receiver_id"] = $receiver_id;
         array_push($creditList, $credit);
     }
     $ConnectionManager->closeConnection($stmt, $conn);
     return $creditList;
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:18,代碼來源:CreditManager.php

示例3: updateSpecificPhoto

 function updateSpecificPhoto($project_id, $photo_no, $new_url)
 {
     $url = self::getSpecificPhotoURL($project_id, $photo_no);
     unlink($url);
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("UPDATE photo SET photo_url=? WHERE project_id=? AND photo_no=?");
     $stmt->bind_param("sss", $new_url, $project_id, $photo_no);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:11,代碼來源:PhotoManager.php

示例4: setGift

 function setGift($code, $product_name, $worth, $photo)
 {
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("UPDATE reward SET product_name = ? , worth = ? , photo = ? WHERE code = ?");
     $stmt->bind_param("ssss", $product_name, $worth, $photo, $code);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:9,代碼來源:RewardManager.php

示例5: deleteProject

 function deleteProject($project_id)
 {
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("DELETE FROM project WHERE project_id = ?");
     $stmt->bind_param("s", $project_id);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:9,代碼來源:ProjectManager.php

示例6: deleteAllPhotosByProduct

 function deleteAllPhotosByProduct($product_id)
 {
     $photoList = self::getPhotos($product_id);
     foreach ($photoList as $url) {
         unlink($url);
     }
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("DELETE FROM photo WHERE product_id = ?");
     $stmt->bind_param("s", $product_id);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:13,代碼來源:PhotoManager.php

示例7: getPostalCode

 function getPostalCode($customer_id, $address_no)
 {
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("SELECT postal_code FROM address WHERE customer_id=? AND address_no=?");
     $stmt->bind_param("si", $customer_id, $address_no);
     $stmt->execute();
     $stmt->bind_result($postal_code);
     $postalcode = '';
     while ($stmt->fetch()) {
         $postalcode = $postal_code;
     }
     $ConnectionManager->closeConnection($stmt, $conn);
     return $postalcode;
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:15,代碼來源:AddressManager.php

示例8: updateColorInOptionalCodeTable

 function updateColorInOptionalCodeTable($product_id, $new_color, $old_color)
 {
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("UPDATE optional_code SET color = ? WHERE product_id = ? AND color = ?");
     $stmt->bind_param("sss", $new_color, $product_id, $old_color);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:9,代碼來源:ProductManager.php

示例9: checkProductPendingOrderStatus

 function checkProductPendingOrderStatus($product_id)
 {
     $result = 0;
     $ConnectionMgr = new ConnectionManager();
     $conn = $ConnectionMgr->getConnection();
     $stmt = $conn->prepare("SELECT COUNT(*) AS count FROM `order` where `product_id` = ? AND `status` = 'pending'");
     $stmt->bind_param("s", $product_id);
     $stmt->execute();
     $stmt->bind_result($count);
     while ($stmt->fetch()) {
         $result = $count;
     }
     $ConnectionMgr->closeConnection($stmt, $conn);
     return $result;
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:15,代碼來源:OrderManager.php

示例10: activateAccount

 function activateAccount($customer_id)
 {
     $verified = "true";
     $ConnectionManager = new ConnectionManager();
     $conn = $ConnectionManager->getConnection();
     $stmt = $conn->prepare("UPDATE customer SET verified=? WHERE customer_id = ?");
     $stmt->bind_param("ss", $verified, $customer_id);
     $stmt->execute();
     $ConnectionManager->closeConnection($stmt, $conn);
 }
開發者ID:jackyFeng,項目名稱:unisol,代碼行數:10,代碼來源:CustomerManager.php


注:本文中的ConnectionManager::closeConnection方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。