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


PHP DBQuery::quoteValue方法代码示例

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


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

示例1: createUnsubscribeKeys

 function createUnsubscribeKeys($letter_id, $delivery_num, $topics_ids)
 {
     global $application;
     $str_topics_ids = implode(',', $topics_ids);
     // copy emails to unsubscribe table
     $ntables = $this->getTables();
     $stables = modApiFunc('Subscriptions', 'getTables');
     $utable = 'newsletter_unsubscribe';
     $ucolumns = $ntables[$utable]['columns'];
     $ltable = 'newsletter_topics';
     $lcolumns = $ntables[$ltable]['columns'];
     $etable = 'subscription_email';
     $ecolumns = $stables[$etable]['columns'];
     $atable = 'email_address';
     $acolumns = $stables[$atable]['columns'];
     $iquery = new DB_Insert_Select($utable);
     $iquery->setModifiers(DB_IGNORE);
     $iquery->setInsertFields(array('key_unsubscribe', 'delivery_num', 'letter_id', 'email_id', 'topics_ids'));
     $squery = new DB_Select($etable);
     $squery->addSelectField('MD5(CONCAT("' . $delivery_num . '", "' . $letter_id . '", "' . $str_topics_ids . '", NOW(), ' . $ecolumns['email_id'] . ', ' . $acolumns['email'] . '))');
     $squery->addSelectField($delivery_num . '-0', 'delivery_num');
     $squery->addSelectField($letter_id . '+0', 'letter_id');
     $squery->addSelectField($ecolumns['email_id']);
     $squery->addSelectField(DBQuery::quoteValue($str_topics_ids));
     $squery->addInnerJoin($atable, $ecolumns['email_id'], DB_EQ, $acolumns['email_id']);
     $squery->Where($ecolumns['topic_id'], DB_IN, DBQuery::arrayToIn($topics_ids));
     $squery->SelectGroup($ecolumns['email_id']);
     $squery->SelectOrder($ecolumns['email_id'], 'ASC');
     $iquery->setSelectQuery($squery);
     $application->db->getDB_Result($iquery);
     $this->_totalRecipients = $this->countTempEmails($delivery_num);
     $this->_sentCountTotal = 0;
     $result = array('Errors' => array($application->db->_getSQL($iquery)), 'Warnings' => array(), 'TotalCount' => $this->_totalRecipients, 'Num' => $delivery_num);
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:35,代码来源:newsletter_api.php

示例2: subscribeTempEmails

 function subscribeTempEmails($key, $topics_ids)
 {
     global $application;
     $tables = Subscriptions::getTables();
     $stable = 'subscription_temp';
     $scolumns =& $tables[$stable]['columns'];
     $itable = 'subscription_email';
     $icolumns =& $tables[$itable]['columns'];
     foreach ($topics_ids as $topic_id) {
         unset($squery);
         $squery = new DB_Select($stable);
         $squery->addSelectField($topic_id);
         $squery->addSelectField($scolumns['email_id']);
         $squery->Where($scolumns['action_key'], DB_EQ, DBQuery::quoteValue($key));
         unset($iquery);
         $iquery = new DB_Insert_Select($itable);
         $iquery->setModifiers(DB_IGNORE);
         $iquery->setInsertFields(array('topic_id', 'email_id'));
         $iquery->setSelectQuery($squery);
         $application->db->getDB_Result($iquery);
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:22,代码来源:subscriptions_api.php

示例3: initQuery

 function initQuery($params)
 {
     $key = $params['key'];
     $otables = Customer_Account::getTables();
     $atable = 'ca_person_info_attrs';
     $gtable = 'ca_attrs_to_groups';
     $dtable = 'ca_person_info_data';
     $stables = Subscriptions::getTables();
     $stable = 'subscription_temp';
     $this->setModifiers(DB_IGNORE);
     $this->setInsertFields(array($stables[$stable]['columns']['action_key']));
     $this->setInsertFields(array($stables[$stable]['columns']['email']));
     $squery = new DB_Select($dtable);
     $squery->addSelectField(DBQuery::quoteValue($key));
     $squery->addSelectField(DBQuery::fLower($otables[$dtable]['columns']['data_value']));
     $squery->addInnerJoin($gtable, $otables[$dtable]['columns']['ag_id'], DB_EQ, $otables[$gtable]['columns']['ag_id']);
     $squery->addInnerJoin($atable, $otables[$gtable]['columns']['attr_id'], DB_EQ, $otables[$atable]['columns']['attr_id']);
     $squery->WhereValue($otables[$atable]['columns']['attr_name'], DB_EQ, 'Email');
     $this->setSelectQuery($squery);
     unset($squery);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:21,代码来源:common.php


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