当前位置: 首页>>代码示例>>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;未经允许,请勿转载。