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