00001 <?php
00002
00007 class oxAttribute extends oxI18n
00008 {
00014 protected $_sClassName = 'oxattribute';
00015
00021 protected $_sCoreTbl = 'oxattribute';
00022
00026 public function __construct()
00027 {
00028 parent::__construct();
00029 $this->init( $this->_sCoreTbl);
00030 }
00031
00039 public function delete( $sOXID = null )
00040 {
00041 if( !$sOXID)
00042 $sOXID = $this->getId();
00043 if( !$sOXID)
00044 return false;
00045
00046
00047
00048 $oDB = oxDb::getDb();
00049 $sOxidQuoted = $oDB->quote($sOXID);
00050 $sDelete = "delete from oxobject2attribute where oxattrid = ".$sOxidQuoted;
00051 $rs = $oDB->execute( $sDelete);
00052
00053
00054 $sDelete = "delete from oxcategory2attribute where oxattrid = ".$sOxidQuoted;
00055 $rs = $oDB->execute( $sDelete);
00056
00057 return parent::delete( $sOXID);
00058 }
00059 }