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


PHP Tool::delete方法代碼示例

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


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

示例1: delete_tool

 public function delete_tool()
 {
     if ($this->loaded) {
         ORM::factory('calendar_item')->where(array('fk_site' => $this->fk_site, 'calendar_id' => $this->id))->delete_all();
         return parent::delete($this->id);
     }
 }
開發者ID:plusjade,項目名稱:plusjade,代碼行數:7,代碼來源:calendar.php

示例2: delete_tool

 public function delete_tool()
 {
     if ($this->loaded) {
         ORM::factory('blog_post')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
         ORM::factory('blog_post_tag')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
         ORM::factory('blog_post_comment')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
         return parent::delete($this->id);
     }
 }
開發者ID:plusjade,項目名稱:plusjade,代碼行數:9,代碼來源:blog.php

示例3: delete

 public function delete($id)
 {
     if ($id) {
         $rs = new Tool($id);
         $rs->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('tools/admin/tools');
 }
開發者ID:unisexx,項目名稱:imac,代碼行數:9,代碼來源:tools.php

示例4: delete_tool

 public function delete_tool()
 {
     if ($this->loaded) {
         $db = Database::instance();
         $db->query("\n        DELETE cats.*, items.*\n        FROM showroom_cats as cats, showroom_cat_items as items\n        WHERE cats.fk_site = '{$this->fk_site}'\n        AND cats.showroom_id = '{$this->id}'\n        AND cats.id = items.showroom_cat_id\n      ");
         # hack to remove the root node which has no items on it.
         ORM::factory('showroom_cat')->where(array('fk_site' => $this->fk_site, 'showroom_id' => $this->id))->delete_all();
         return parent::delete($this->id);
     }
 }
開發者ID:plusjade,項目名稱:plusjade,代碼行數:10,代碼來源:showroom.php

示例5: delete_tool

 public function delete_tool()
 {
     if ($this->loaded) {
         return parent::delete($this->id);
     }
 }
開發者ID:plusjade,項目名稱:plusjade,代碼行數:6,代碼來源:account.php


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