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


PHP rcube_db::quote方法代码示例

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


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

示例1: unset

 /**
  * Clears thread cache.
  *
  * @param string  $mailbox     Folder name
  */
 function remove_thread($mailbox = null)
 {
     $this->db->query("DELETE FROM {$this->thread_table}" . " WHERE `user_id` = ?" . (strlen($mailbox) ? " AND `mailbox` = " . $this->db->quote($mailbox) : ""), $this->userid);
     if (strlen($mailbox)) {
         unset($this->icache[$mailbox]['thread']);
         // Thread data removed, set flag to skip SELECT query in get_thread()
         $this->icache[$mailbox]['thread_queried'] = true;
     } else {
         $this->icache = array();
     }
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:16,代码来源:rcube_imap_cache.php

示例2: VALUES

 /**
  * Create a contact group with the given name
  *
  * @param string The group name
  * @return mixed False on error, array with record props in success
  */
 function create_group($name)
 {
     $result = false;
     // make sure we have a unique name
     $name = $this->unique_groupname($name);
     $this->db->query("INSERT INTO " . $this->db->table_name($this->db_groups) . " (user_id, changed, name)" . " VALUES (" . intval($this->user_id) . ", " . $this->db->now() . ", " . $this->db->quote($name) . ")");
     if ($insert_id = $this->db->insert_id($this->db_groups)) {
         $result = array('id' => $insert_id, 'name' => $name);
     }
     return $result;
 }
开发者ID:netcon-source,项目名称:roundcubemail,代码行数:17,代码来源:rcube_contacts.php

示例3: remove_record

 /**
  * Deletes the cache record(s).
  *
  * @param string  $key         Cache key name or pattern
  * @param boolean $prefix_mode Enable it to clear all keys starting
  *                             with prefix specified in $key
  */
 private function remove_record($key = null, $prefix_mode = false)
 {
     if (!$this->db) {
         return;
     }
     if ($this->type != 'db') {
         $this->load_index();
         // Remove all keys
         if ($key === null) {
             foreach ($this->index as $key) {
                 $this->delete_record($this->ckey($key));
             }
             $this->index = array();
         } else {
             if ($prefix_mode) {
                 foreach ($this->index as $idx => $k) {
                     if (strpos($k, $key) === 0) {
                         $this->delete_record($this->ckey($k));
                         unset($this->index[$idx]);
                     }
                 }
             } else {
                 $this->delete_record($this->ckey($key));
                 if (($idx = array_search($key, $this->index)) !== false) {
                     unset($this->index[$idx]);
                 }
             }
         }
         $this->index_changed = true;
         return;
     }
     // Remove all keys (in specified cache)
     if ($key === null) {
         $where = " WHERE `cache_key` LIKE " . $this->db->quote($this->prefix . '.%');
     } else {
         if ($prefix_mode) {
             $where = " WHERE `cache_key` LIKE " . $this->db->quote($this->prefix . '.' . $key . '%');
         } else {
             $where = " WHERE `cache_key` = " . $this->db->quote($this->prefix . '.' . $key);
         }
     }
     $this->db->query("DELETE FROM " . $this->table . $where);
 }
开发者ID:jimjag,项目名称:roundcubemail,代码行数:50,代码来源:rcube_cache_shared.php

示例4: remove_record

 /**
  * Deletes the cache record(s).
  *
  * @param string  $key         Cache key name or pattern
  * @param boolean $prefix_mode Enable it to clear all keys starting
  *                             with prefix specified in $key
  */
 private function remove_record($key = null, $prefix_mode = false)
 {
     if (!$this->db) {
         return;
     }
     if ($this->type != 'db') {
         $this->load_index();
         // Remove all keys
         if ($key === null) {
             foreach ($this->index as $key) {
                 $this->delete_record($key, false);
             }
             $this->index = array();
         } else {
             if ($prefix_mode) {
                 foreach ($this->index as $k) {
                     if (strpos($k, $key) === 0) {
                         $this->delete_record($k);
                     }
                 }
             } else {
                 $this->delete_record($key);
             }
         }
         return;
     }
     // Remove all keys (in specified cache)
     if ($key === null) {
         $where = " AND cache_key LIKE " . $this->db->quote($this->prefix . '.%');
     } else {
         if ($prefix_mode) {
             $where = " AND cache_key LIKE " . $this->db->quote($this->prefix . '.' . $key . '%');
         } else {
             $where = " AND cache_key = " . $this->db->quote($this->prefix . '.' . $key);
         }
     }
     $this->db->query("DELETE FROM " . $this->table . " WHERE user_id = ?" . $where, $this->userid);
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:45,代码来源:rcube_cache.php


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