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


PHP Zend_Db_Adapter_Pdo_Mysql::quoteInto方法代码示例

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


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

示例1: addSingleRight

 /**
  * add single role rights 
  *
  * @param   int $_roleId
  * @param   int $_applicationId
  * @param   string $_right
  */
 public function addSingleRight($_roleId, $_applicationId, $_right)
 {
     // check if already in
     $select = $this->_roleRightsTable->select();
     $select->where($this->_db->quoteInto($this->_db->quoteIdentifier('role_id') . ' = ?', $_roleId))->where($this->_db->quoteInto($this->_db->quoteIdentifier('right') . ' = ?', $_right))->where($this->_db->quoteInto($this->_db->quoteIdentifier('application_id') . ' = ?', $_applicationId));
     if (!($row = $this->_roleRightsTable->fetchRow($select))) {
         $data = array('role_id' => $_roleId, 'application_id' => $_applicationId, 'right' => $_right);
         $this->_roleRightsTable->insert($data);
     }
 }
开发者ID:rodrigofns,项目名称:ExpressoLivre3,代码行数:17,代码来源:Roles.php

示例2: getContexts

 /**
  * returns all contexts of a given tag
  *
  * @param  string $_tagId
  * @return array  array of application ids
  */
 public function getContexts($_tagId)
 {
     $select = $this->_db->select()->from(array('tags_context' => SQL_TABLE_PREFIX . 'tags_context'), array('application_id' => $this->_dbCommand->getAggregate('application_id')))->where($this->_db->quoteInto($this->_db->quoteIdentifier('tag_id') . ' = ?', $_tagId))->group('tag_id');
     Tinebase_Backend_Sql_Abstract::traitGroup($select);
     $apps = $this->_db->fetchOne($select);
     if ($apps === '0') {
         $apps = 'any';
     }
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' got tag contexts: ' . $apps);
     }
     return explode(',', $apps);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:19,代码来源:Tags.php

示例3: quoteInto

 /**
  * Quotes a value and places into a piece of text at a placeholder.
  *
  * Method revrited for handle empty arrays in value param
  *
  * @param string  $text  The text with a placeholder.
  * @param mixed   $value The value to quote.
  * @param string  $type  OPTIONAL SQL datatype
  * @param integer $count OPTIONAL count of placeholders to replace
  * @return string An SQL-safe quoted value placed into the orignal text.
  */
 public function quoteInto($text, $value, $type = null, $count = null)
 {
     if (is_array($value) && empty($value)) {
         $value = new Zend_Db_Expr('NULL');
     }
     return parent::quoteInto($text, $value, $type, $count);
 }
开发者ID:z4kko,项目名称:smartdevs-indexer,代码行数:18,代码来源:Mysql.php

示例4: quoteInto

 /**
  * Quotes a value and places into a piece of text at a placeholder.
  *
  * Method revrited for handle empty arrays in value param
  *
  * @param string  $text  The text with a placeholder.
  * @param mixed   $value The value to quote.
  * @param string  $type  OPTIONAL SQL datatype
  * @param integer $count OPTIONAL count of placeholders to replace
  * @return string An SQL-safe quoted value placed into the orignal text.
  */
 public function quoteInto($text, $value, $type = null, $count = null)
 {
     if (is_array($value) && empty($value)) {
         $value = new \Zend_Db_Expr('NULL');
     }
     if ($value instanceof \DateTimeInterface) {
         $value = $value->format('Y-m-d H:i:s');
     }
     return parent::quoteInto($text, $value, $type, $count);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:21,代码来源:Mysql.php

示例5: deleteNoteType

 /**
  * delete note type
  *
  * @param integer $_noteTypeId
  */
 public function deleteNoteType($_noteTypeId)
 {
     $this->_noteTypesTable->delete($this->_db->quoteInto($this->_db->quoteIdentifier('id') . ' = ?', $_noteTypeId));
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:9,代码来源:Notes.php


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