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


PHP Sql::pDelete方法代码示例

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


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

示例1: remove

 /**
  *
  * @param $type
  * @param $object_id   the object who owns the bookmark
  */
 public static function remove($type, $object_id, $owner = 0)
 {
     if (!is_numeric($type) || !is_numeric($object_id) || !is_numeric($owner)) {
         throw new \Exception('noo');
     }
     $session = SessionHandler::getInstance();
     $q = 'DELETE FROM ' . self::$tbl_name . ' WHERE owner = ?' . ' AND value = ?' . ' AND type = ?';
     return Sql::pDelete($q, 'iii', $owner ? $owner : $session->id, $object_id, $type);
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:14,代码来源:Bookmark.php

示例2: removeFromGroup

 public static function removeFromGroup($user_id, $grp_id)
 {
     $q = 'DELETE FROM ' . self::$tbl_name . ' WHERE groupId = ? AND userId = ?';
     Sql::pDelete($q, 'ii', $grp_id, $user_id);
     return true;
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:6,代码来源:UserGroupHandler.php

示例3: deleteByReference

 public static function deleteByReference($type, $reference)
 {
     $q = 'DELETE FROM ' . self::$tbl_name . ' WHERE type = ? AND reference = ?';
     return Sql::pDelete($q, 'ii', $type, $reference);
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:5,代码来源:ModerationObject.php

示例4: gc

 /** Garbage Collection */
 public function gc($maxlifetime)
 {
     $q = 'DELETE FROM tblSessionData WHERE expires < NOW()';
     Sql::pDelete($q);
     return true;
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:7,代码来源:SessionStorageHandler.php

示例5: deleteById

 public static function deleteById($id, $tblname, $field_name = 'id')
 {
     if (!is_alphanumeric($tblname) || !is_alphanumeric($field_name)) {
         throw new \Exception('very bad');
     }
     if (!is_numeric($id)) {
         throw new \Exception('bad data' . $id);
     }
     $q = 'DELETE FROM ' . $tblname . ' WHERE ' . $field_name . ' = ?';
     Sql::pDelete($q, 'i', $id);
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:11,代码来源:SqlObject.php

示例6: delete

 public static function delete($type, $owner, $name)
 {
     $q = 'DELETE FROM ' . self::$tbl_name . ' WHERE owner = ? AND type = ? AND name = ?';
     Sql::pDelete($q, 'iis', $owner, $type, $name);
     return true;
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:6,代码来源:Setting.php

示例7: deleteByRoom

 /**
  * Removes all chat messages from a chatroom
  */
 public static function deleteByRoom($id)
 {
     $q = 'DELETE FROM ' . self::$tbl_name . ' WHERE room = ?';
     Sql::pDelete($q, 'i', $id);
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:8,代码来源:ChatMessage.php


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