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


PHP Record::delete方法代码示例

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


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

示例1: deleteId

 public static function deleteId($id)
 {
     self::deleteAttchment($id);
     return Record::delete('ContentPart', (int) $id);
 }
开发者ID:chaobj001,项目名称:tt,代码行数:5,代码来源:ContentPart.class.php

示例2: executeEdit

 /**
  * Edit
  */
 public function executeEdit()
 {
     if ($this->isGET()) {
         return $this->renderJson(array("success" => false, "info" => "POST only."));
     } else {
         $ids = array();
         foreach ($this->getRequestParameter('record') as $data) {
             if (!($record = RecordPeer::retrieveByPK($data['id']))) {
                 $record = new Record();
                 $record->setDomainId($this->domain->getId());
             }
             $record->setName($data['name']);
             $record->setType($data['type']);
             $record->setContent($data['content']);
             $record->setTtl($data['ttl']);
             if ($data['type'] == 'MX' || $data['type'] == 'SRV') {
                 $record->setPrio($data['prio']);
             }
             $record->save();
             $ids[] = $record->getId();
         }
         $c = new Criteria();
         $c->add(RecordPeer::DOMAIN_ID, $this->domain->getId());
         $c->add(RecordPeer::ID, $ids, Criteria::NOT_IN);
         foreach (RecordPeer::doSelect($c) as $record) {
             $record->delete();
         }
         return $this->renderJson(array("success" => true, "info" => "Domain updated."));
     }
 }
开发者ID:royalterra,项目名称:pdns-gui,代码行数:33,代码来源:actions.class.php

示例3: deleteId

 public static function deleteId($id)
 {
     return Record::delete('Article', (int) $id);
 }
开发者ID:chaobj001,项目名称:tt,代码行数:4,代码来源:Article.class.php

示例4: delete

    public function delete()
    {
        global $g_pdo;
        $request = <<<EOF
DELETE FROM
  event_guest
WHERE
  id_guest = :id
EOF;
        debug($request);
        debug("array=" . sprint_r(array(":id" => $this->id)));
        $pst = $g_pdo->prepare($request);
        $pst->execute(array(":id" => $this->id));
        parent::delete();
    }
开发者ID:centaurustech,项目名称:truc,代码行数:15,代码来源:Guest.class.php


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