當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。