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


PHP Requirements::deleteRequirementsForRequirementObject方法代碼示例

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


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

示例1: deleteWebPage

 public static function deleteWebPage($gameId, $webPageId)
 {
     Locations::deleteLocationsForObject($gameId, 'WebPage', $webPageId);
     Requirements::deleteRequirementsForRequirementObject($gameId, 'WebPage', $webPageId);
     PlayerStateChanges::deletePlayerStateChangesThatRefrenceObject($gameId, 'WebPage', $webPageId);
     $query = "DELETE FROM web_pages WHERE game_id = '{$gameId}' AND web_page_id = {$webPageId}";
     $rsResult = Module::query($query);
     if (mysql_error()) {
         return new returnData(3, NULL, "SQL Error");
     }
     if (mysql_affected_rows()) {
         return new returnData(0, TRUE);
     } else {
         return new returnData(0, FALSE);
     }
 }
開發者ID:spoymenov,項目名稱:arisgames,代碼行數:16,代碼來源:webpages.php

示例2: deleteNode

 public function deleteNode($gameId, $intNodeID)
 {
     Locations::deleteLocationsForObject($gameId, 'Node', $intNodeID);
     Requirements::deleteRequirementsForRequirementObject($gameId, 'Node', $intNodeID);
     PlayerStateChanges::deletePlayerStateChangesThatRefrenceObject($gameId, 'Node', $intNodeID);
     $query = "DELETE FROM nodes WHERE game_id = {$gameId} AND node_id = {$intNodeID}";
     $rsResult = Module::query($query);
     if (mysql_error()) {
         return new returnData(3, NULL, "SQL Error");
     }
     if (mysql_affected_rows()) {
         return new returnData(0);
     } else {
         return new returnData(2, NULL, 'invalid node id');
     }
 }
開發者ID:spoymenov,項目名稱:arisgames,代碼行數:16,代碼來源:nodes.php

示例3: deleteItem

 public static function deleteItem($gameId, $itemId)
 {
     Locations::deleteLocationsForObject($gameId, 'Item', $itemId);
     Requirements::deleteRequirementsForRequirementObject($gameId, 'Item', $itemId);
     PlayerStateChanges::deletePlayerStateChangesThatRefrenceObject($gameId, 'Item', $itemId);
     Module::removeItemFromAllPlayerInventories($gameId, $itemId);
     $query = "DELETE FROM items WHERE item_id = {$itemId} AND game_id = '{$gameId}'";
     $rsResult = Module::query($query);
     if (mysql_error()) {
         return new returnData(3, NULL, "SQL Error");
     }
     if (mysql_affected_rows()) {
         return new returnData(0, TRUE);
     } else {
         return new returnData(0, FALSE);
     }
 }
開發者ID:kimblemj,項目名稱:server,代碼行數:17,代碼來源:items.php

示例4: deleteNpc

 public function deleteNpc($gameId, $intNpcId)
 {
     Locations::deleteLocationsForObject($gameId, 'Npc', $intNpcId);
     Requirements::deleteRequirementsForRequirementObject($gameId, 'Npc', $intNpcId);
     PlayerStateChanges::deletePlayerStateChangesThatRefrenceObject($gameId, 'Npc', $intNpcId);
     Nodes::deleteNodesReferencedByObject($gameId, 'Npc', $intNpcId);
     $query = "DELETE FROM npcs WHERE npc_id = {$intNpcId} AND game_id = {$gameId}";
     $rsResult = Module::query($query);
     if (mysql_error()) {
         return new returnData(3, NULL, "SQL Error");
     }
     $hasDeletedNPC = mysql_affected_rows();
     $query = "DELETE FROM npc_conversations WHERE npc_id = {$intNpcId} AND game_id = {$gameId}";
     $rsResult = Module::query($query);
     if (mysql_error()) {
         return new returnData(3, NULL, "SQL Error");
     }
     if ($hasDeletedNPC) {
         return new returnData(0);
     } else {
         return new returnData(2, 'invalid npc id');
     }
 }
開發者ID:kimblemj,項目名稱:server,代碼行數:23,代碼來源:npcs.php


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