Go to the documentation of this file.00001 <?php
00002
00007 class oxDeliverySet extends oxI18n
00008 {
00014 protected $_sCoreTbl = 'oxdeliveryset';
00015
00021 protected $_sClassName = 'oxdeliveryset';
00022
00026 public function __construct()
00027 {
00028 parent::__construct();
00029 $this->init( 'oxdeliveryset' );
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 $oDb = oxDb::getDb();
00050
00051 $sOxidQuoted = $oDb->quote($sOxId);
00052 $oDb->execute( 'delete from oxobject2payment where oxobjectid = '.$sOxidQuoted );
00053 $oDb->execute( 'delete from oxobject2delivery where oxdeliveryid = '.$sOxidQuoted);
00054 $oDb->execute( 'delete from oxdel2delset where oxdelsetid = '.$sOxidQuoted);
00055
00056 return parent::delete( $sOxId );
00057 }
00058
00066 public function getIdByName( $sTitle )
00067 {
00068 $sQ = "SELECT `oxid` FROM `" . getViewName( 'oxdeliveryset' ) . "` WHERE `oxtitle` = " . oxDb::getDb()->quote( $sTitle );
00069 $sId = oxDb::getDb()->getOne( $sQ );
00070
00071 return $sId;
00072 }
00073 }