Go to the documentation of this file.00001 <?php
00002
00008 class oxGroups extends oxI18n
00009 {
00010
00016 protected $_sClassName = 'oxgroups';
00017
00021 public function __construct()
00022 {
00023 parent::__construct();
00024 $this->init('oxgroups');
00025 }
00026
00027
00035 public function delete($sOXID = null)
00036 {
00037 if (!$sOXID) {
00038 $sOXID = $this->getId();
00039 }
00040 if (!$sOXID) {
00041 return false;
00042 }
00043
00044
00045
00046 parent::delete($sOXID);
00047
00048 $oDb = oxDb::getDb();
00049
00050
00051
00052 $sDelete = 'delete from oxobject2group where oxobject2group.oxgroupsid = ' . $oDb->quote($sOXID);
00053 $rs = $oDb->execute($sDelete);
00054
00055 $sDelete = 'delete from oxobject2delivery where oxobject2delivery.oxobjectid = ' . $oDb->quote($sOXID);
00056 $rs = $oDb->execute($sDelete);
00057
00058 $sDelete = 'delete from oxobject2discount where oxobject2discount.oxobjectid = ' . $oDb->quote($sOXID);
00059 $rs = $oDb->execute($sDelete);
00060
00061 $sDelete = 'delete from oxobject2payment where oxobject2payment.oxobjectid = ' . $oDb->quote($sOXID);
00062 $rs = $oDb->execute($sDelete);
00063
00064 return $rs->EOF;
00065 }
00066
00067 }