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


PHP rcube_db::array2list方法代碼示例

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


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

示例1: explode

 /**
  * Remove the given contact records from a certain group
  *
  * @param string  Group identifier
  * @param array   List of contact identifiers to be removed
  * @return int    Number of deleted group members
  */
 function remove_from_group($group_id, $ids)
 {
     if (!is_array($ids)) {
         $ids = explode(self::SEPARATOR, $ids);
     }
     $ids = $this->db->array2list($ids, 'integer');
     $sql_result = $this->db->query("DELETE FROM " . $this->db->table_name($this->db_groupmembers) . " WHERE contactgroup_id=?" . " AND contact_id IN ({$ids})", $group_id);
     return $this->db->affected_rows();
 }
開發者ID:netcon-source,項目名稱:roundcubemail,代碼行數:16,代碼來源:rcube_contacts.php

示例2: IN

 /**
  * Removes message(s) from cache.
  *
  * @param string $mailbox  Folder name
  * @param array  $uids     Message UIDs, NULL removes all messages
  */
 function remove_message($mailbox = null, $uids = null)
 {
     if (!strlen($mailbox)) {
         $this->db->query("DELETE FROM " . $this->db->table_name('cache_messages') . " WHERE user_id = ?", $this->userid);
     } else {
         // Remove the message from internal cache
         if (!empty($uids) && ($message = $this->icache['__message']) && $message['mailbox'] === $mailbox && in_array($message['object']->uid, (array) $uids)) {
             $this->icache['__message'] = null;
         }
         $this->db->query("DELETE FROM " . $this->db->table_name('cache_messages') . " WHERE user_id = ?" . " AND mailbox = ?" . ($uids !== null ? " AND uid IN (" . $this->db->array2list((array) $uids, 'integer') . ")" : ""), $this->userid, $mailbox);
     }
 }
開發者ID:rockchow2002,項目名稱:roundcubemail,代碼行數:18,代碼來源:rcube_imap_cache.php

示例3: IN

 /**
  * Removes message(s) from cache.
  *
  * @param string $mailbox  Folder name
  * @param array  $uids     Message UIDs, NULL removes all messages
  */
 function remove_message($mailbox = null, $uids = null)
 {
     if (!($this->mode & self::MODE_MESSAGE)) {
         return;
     }
     if (!strlen($mailbox)) {
         $this->db->query("DELETE FROM {$this->messages_table}" . " WHERE `user_id` = ?", $this->userid);
     } else {
         // Remove the message from internal cache
         if (!empty($uids) && ($message = $this->icache['__message']) && $message['mailbox'] === $mailbox && in_array($message['object']->uid, (array) $uids)) {
             $this->icache['__message'] = null;
         }
         $this->db->query("DELETE FROM {$this->messages_table}" . " WHERE `user_id` = ?" . " AND `mailbox` = ?" . ($uids !== null ? " AND `uid` IN (" . $this->db->array2list((array) $uids, 'integer') . ")" : ""), $this->userid, $mailbox);
     }
 }
開發者ID:JotapePinheiro,項目名稱:roundcubemail,代碼行數:21,代碼來源:rcube_imap_cache.php


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