oxgroups.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class oxGroups extends oxI18n
00008 {
00009 
00014     protected $_sCoreTbl   = 'oxgroups';
00015 
00020     protected $_sClassName = 'oxgroups';
00021 
00025     public function __construct()
00026     {
00027         parent::__construct();
00028         $this->init( 'oxgroups' );
00029     }
00030 
00031 
00039     public function delete( $sOXID = null )
00040     {
00041         if ( !$sOXID ) {
00042             $sOXID = $this->getId();
00043         }
00044         if ( !$sOXID ) {
00045             return false;
00046         }
00047 
00048 
00049 
00050         parent::delete( $sOXID );
00051 
00052         $oDB = oxDb::getDb();
00053 
00054 
00055         // deleting related data records
00056         $sDelete = 'delete from oxobject2group where oxobject2group.oxgroupsid = ' . $oDB->quote( $sOXID );
00057         $rs = $oDB->execute( $sDelete );
00058 
00059         $sDelete = 'delete from oxobject2delivery where oxobject2delivery.oxobjectid = ' . $oDB->quote( $sOXID );
00060         $rs = $oDB->execute( $sDelete );
00061 
00062         $sDelete = 'delete from oxobject2discount where oxobject2discount.oxobjectid = ' . $oDB->quote( $sOXID );
00063         $rs = $oDB->execute( $sDelete );
00064 
00065         $sDelete = 'delete from oxobject2payment where oxobject2payment.oxobjectid = ' . $oDB->quote( $sOXID );
00066         $rs = $oDB->execute( $sDelete );
00067 
00068         return $rs->EOF;
00069     }
00070 
00071 }