当前位置: 首页>>代码示例>>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;未经允许,请勿转载。