本文整理汇总了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();
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}