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


PHP oxDb::getInstance方法代码示例

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


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

示例1: tearDown

 /**
  * Tear down the fixture.
  *
  * @return null
  */
 protected function tearDown()
 {
     $this->getConfig()->setGlobalParameter('listtype', null);
     oxRemClassModule('oxCacheHelper');
     $this->cleanUpTable('oxobject2attribute');
     // ensure modules detached
     oxTestModules::cleanAllModules();
     $oDB = oxDb::getDB();
     $oDB->execute('delete from oxaccessoire2article where oxarticlenid="_testArt" ');
     $oDB->execute("update oxattribute set oxdisplayinbasket = 0 where oxid = '8a142c3f0b9527634.96987022' ");
     $this->cleanUpTable('oxarticles');
     $this->cleanUpTable('oxartextends');
     $this->cleanUpTable('oxcategories');
     $this->cleanUpTable('oxorderarticles');
     $this->cleanUpTable('oxprice2article', 'oxartid');
     $this->cleanUpTable('oxobject2category');
     $this->cleanUpTable('oxobject2category', 'oxobjectid');
     $this->cleanUpTable('oxobject2category', 'oxcatnid');
     $this->cleanUpTable('oxreviews');
     $this->cleanUpTable('oxdiscount');
     $oDB->Execute('delete from oxselectlist where oxid = "_testoxsellist" ');
     $oDB->Execute('delete from oxobject2selectlist where oxselnid = "_testoxsellist" ');
     oxDb::getInstance()->resetTblDescCache();
     parent::tearDown();
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:30,代码来源:oxarticleTest.php

示例2: updateViews

 /**
  * Performs full view update
  *
  * @return mixed
  */
 public function updateViews()
 {
     //preventing edit for anyone except malladmin
     if (oxSession::getVar("malladmin")) {
         oxDb::getInstance()->updateViews();
         $this->_aViewData["blViewSuccess"] = true;
     }
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:13,代码来源:tools_list.php

示例3: removeFromSet

 /**
  * Remove this delivery cost from these sets
  */
 public function removeFromSet()
 {
     $aRemoveGroups = $this->_getActionIds('oxdel2delset.oxid');
     if ($this->getConfig()->getRequestParameter('all')) {
         $sQ = $this->_addFilter("delete oxdel2delset.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif ($aRemoveGroups && is_array($aRemoveGroups)) {
         $sQ = "delete from oxdel2delset where oxdel2delset.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aRemoveGroups)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:14,代码来源:deliveryset_main_ajax.php

示例4: removeArtFromSel

 /**
  * Removes article from Selection list
  */
 public function removeArtFromSel()
 {
     $aChosenArt = $this->_getActionIds('oxobject2selectlist.oxid');
     if (oxRegistry::getConfig()->getRequestParameter('all')) {
         $sQ = parent::_addFilter("delete oxobject2selectlist.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenArt)) {
         $sQ = "delete from oxobject2selectlist where oxobject2selectlist.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenArt)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:14,代码来源:selectlist_main_ajax.php

示例5: removepayfromset

 /**
  * Remove these payments from this set
  *
  * @return null
  */
 public function removepayfromset()
 {
     $aChosenCntr = $this->_getActionIds('oxobject2payment.oxid');
     if (oxConfig::getParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2payment.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenCntr)) {
         $sQ = "delete from oxobject2payment where oxobject2payment.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenCntr)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:16,代码来源:deliveryset_payment.inc.php

示例6: removeuserfromgroup

 /**
  * Removes user from selected user group(s).
  *
  * @return null
  */
 public function removeuserfromgroup()
 {
     $aRemoveGroups = $this->_getActionIds('oxobject2group.oxid');
     if (oxConfig::getParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2group.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif ($aRemoveGroups && is_array($aRemoveGroups)) {
         $sQ = "delete from oxobject2group where oxobject2group.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aRemoveGroups)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:16,代码来源:user_main.inc.php

示例7: removeCountryFromDel

 /**
  * Removes chosen countries from delivery list
  */
 public function removeCountryFromDel()
 {
     $aChosenCntr = $this->_getActionIds('oxobject2delivery.oxid');
     if ($this->getConfig()->getRequestParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2delivery.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenCntr)) {
         $sQ = "delete from oxobject2delivery where oxobject2delivery.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenCntr)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:14,代码来源:delivery_main_ajax.php

示例8: removecatfromdel

 /**
  * Removes category from delivery configuration
  *
  * @return null
  */
 public function removecatfromdel()
 {
     $aChosenCat = $this->_getActionIds('oxobject2delivery.oxid');
     // removing all
     if (oxConfig::getParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2delivery.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenCat)) {
         $sQ = "delete from oxobject2delivery where oxobject2delivery.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenCat)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:17,代码来源:delivery_categories.inc.php

示例9: removecatfromattr

 /**
  * Removes category from Attributes list
  *
  * @return null
  */
 public function removecatfromattr()
 {
     $aChosenCat = $this->_getActionIds('oxcategory2attribute.oxid');
     if (oxConfig::getParameter('all')) {
         $sQ = $this->_addFilter("delete oxcategory2attribute.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenCat)) {
         $sQ = "delete from oxcategory2attribute where oxcategory2attribute.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenCat)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
     $this->resetContentCache();
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:17,代码来源:attribute_category.inc.php

示例10: removePromotionGroup

 /**
  * Removes user group from promotion
  */
 public function removePromotionGroup()
 {
     $aRemoveGroups = $this->_getActionIds('oxobject2action.oxid');
     if (oxRegistry::getConfig()->getRequestParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2action.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif ($aRemoveGroups && is_array($aRemoveGroups)) {
         $sRemoveGroups = implode(", ", oxDb::getInstance()->quoteArray($aRemoveGroups));
         $sQ = "delete from oxobject2action where oxobject2action.oxid in (" . $sRemoveGroups . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:15,代码来源:actions_groups_ajax.php

示例11: removeDiscCat

 /**
  * Removes selected category (categories) from discount list
  */
 public function removeDiscCat()
 {
     $oConfig = $this->getConfig();
     $aChosenCat = $this->_getActionIds('oxobject2discount.oxid');
     if ($oConfig->getRequestParameter('all')) {
         $sQ = $this->_addFilter("delete oxobject2discount.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenCat)) {
         $sChosenCategories = implode(", ", oxDb::getInstance()->quoteArray($aChosenCat));
         $sQ = "delete from oxobject2discount where oxobject2discount.oxid in (" . $sChosenCategories . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:16,代码来源:discount_categories_ajax.php

示例12: removeattr

 /**
  * Removes article attributes.
  *
  * @return null
  */
 public function removeattr()
 {
     $aChosenArt = $this->_getActionIds('oxobject2attribute.oxid');
     $sOxid = oxConfig::getParameter('oxid');
     if (oxConfig::getParameter('all')) {
         $sO2AViewName = $this->_getViewName('oxobject2attribute');
         $sQ = $this->_addFilter("delete {$sO2AViewName}.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenArt)) {
         $sQ = "delete from oxobject2attribute where oxobject2attribute.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenArt)) . ") ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:18,代码来源:article_attribute.inc.php

示例13: removeArticleAcc

 /**
  * Removing article form accessories article list
  */
 public function removeArticleAcc()
 {
     $aChosenArt = $this->_getActionIds('oxaccessoire2article.oxid');
     // removing all
     if (oxRegistry::getConfig()->getRequestParameter('all')) {
         $sQ = $this->_addFilter("delete oxaccessoire2article.* " . $this->_getQuery());
         oxDb::getDb()->Execute($sQ);
     } elseif (is_array($aChosenArt)) {
         $sChosenArticles = implode(", ", oxDb::getInstance()->quoteArray($aChosenArt));
         $sQ = "delete from oxaccessoire2article where oxaccessoire2article.oxid in ({$sChosenArticles}) ";
         oxDb::getDb()->Execute($sQ);
     }
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:16,代码来源:article_accessories_ajax.php

示例14: removeDiscGroup

 /**
  * Removes user group from discount config
  */
 public function removeDiscGroup()
 {
     $config = $this->getConfig();
     $groupIds = $this->_getActionIds('oxobject2discount.oxid');
     if ($config->getRequestParameter('all')) {
         $query = $this->_addFilter("delete oxobject2discount.* " . $this->_getQuery());
         oxDb::getDb()->Execute($query);
     } elseif ($groupIds && is_array($groupIds)) {
         $groupIdsQuoted = implode(", ", oxDb::getInstance()->quoteArray($groupIds));
         $query = "delete from oxobject2discount where oxobject2discount.oxid in (" . $groupIdsQuoted . ") ";
         oxDb::getDb()->Execute($query);
     }
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:16,代码来源:discount_groups_ajax.php

示例15: loadWishlistUsers

 /**
  * Load searched user list with wishlist
  *
  * @param string $sSearchStr Search string
  *
  * @return null;
  */
 public function loadWishlistUsers($sSearchStr)
 {
     $sSearchStr = oxDb::getInstance()->escapeString($sSearchStr);
     if (!$sSearchStr) {
         return;
     }
     $sSelect = "select oxuser.oxid, oxuser.oxfname, oxuser.oxlname from oxuser ";
     $sSelect .= "left join oxuserbaskets on oxuserbaskets.oxuserid = oxuser.oxid ";
     $sSelect .= "where oxuserbaskets.oxid is not null and oxuserbaskets.oxtitle = 'wishlist' ";
     $sSelect .= "and oxuserbaskets.oxpublic = 1 ";
     $sSelect .= "and ( oxuser.oxusername like '%{$sSearchStr}%' or oxuser.oxlname like '%{$sSearchStr}%')";
     $sSelect .= "and ( select 1 from oxuserbasketitems where oxuserbasketitems.oxbasketid = oxuserbaskets.oxid limit 1)";
     $this->selectString($sSelect);
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:21,代码来源:oxuserlist.php


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