Go to the documentation of this file.00001 <?php
00002
00003
00007 class oxLegacyDb extends oxSuperCfg
00008 {
00009
00015 protected $_oDb = null;
00016
00017
00025 public function setConnection( $oConnection )
00026 {
00027 $this->_oDb = $oConnection;
00028 }
00029
00037 public function setFetchMode ( $iFetchMode )
00038 {
00039 $this->_oDb->setFetchMode( $iFetchMode );
00040
00041 }
00042
00050 public function getDb( $blType = true )
00051 {
00052
00053 return $this->_oDb;
00054 }
00055
00065 public function getOne( $sSql, $aParams = false, $blType = true )
00066 {
00067 return $this->getDb( $blType )->getOne( $sSql, $aParams );
00068 }
00069
00079 public function getArray( $sSql, $aParams = false, $blType = true )
00080 {
00081 return $this->getDb( $blType )->getArray( $sSql, $aParams );
00082 }
00083
00093 public function getRow( $sSql, $aParams = false, $blType = true )
00094 {
00095 return $this->getDb( $blType )->getRow( $sSql, $aParams );
00096 }
00097
00107 public function getAll( $sSql, $aParams = false, $blType = true )
00108 {
00109
00110 return $this->getDb( $blType )->getAll( $sSql, $aParams );
00111 }
00112
00122 public function select( $sSql, $aParams = false, $blType = true )
00123 {
00124 return $this->getDb( $blType )->execute( $sSql, $aParams );
00125 }
00126
00136 public function getAssoc( $sSql, $aParams = false, $blType = true )
00137 {
00138 return $this->getDb( $blType )->getAssoc( $sSql, $aParams );
00139 }
00140
00150 public function getCol( $sSql, $aParams = false, $blType = true )
00151 {
00152 return $this->getDb( $blType )->getCol( $sSql, $aParams );
00153 }
00154
00166 public function selectLimit( $sSql, $iRows=-1, $iOffset=-1, $aParams = false, $blType = true )
00167 {
00168 return $this->getDb( $blType )->SelectLimit( $sSql, $iRows, $iOffset, $aParams );
00169 }
00170
00179 public function execute( $sSql, $aParams = false )
00180 {
00181 return $this->getDb( false )->execute( $sSql, $aParams );
00182 }
00183
00192 public function query( $sSql, $aParams = false )
00193 {
00194 return $this->getDb( false )->Query( $sSql, $aParams );
00195 }
00196
00202 public function Affected_Rows()
00203 {
00204 return $this->getDb( false )->Affected_Rows();
00205 }
00206
00212 public function errorNo()
00213 {
00214 return $this->getDb( false )->ErrorNo();
00215 }
00216
00222 public function errorMsg()
00223 {
00224 return $this->getDb( false )->ErrorMsg();
00225 }
00226
00234 public function qstr( $sValue )
00235 {
00236 return $this->getDb( false )->qstr( $sValue );
00237 }
00238
00246 public function quote( $sValue )
00247 {
00248 return $this->getDb( false )->quote( $sValue );
00249 }
00250
00258 public function metaColumns( $sTable )
00259 {
00260 return $this->getDb( false )->MetaColumns( $sTable );
00261 }
00262
00271 public function metaColumnNames( $sTable, $blNumIndexes=false )
00272 {
00273 return $this->getDb( false )->MetaColumnNames( $sTable, $blNumIndexes );
00274 }
00275
00281 public function startTransaction()
00282 {
00283 return $this->getDb( false )->execute( 'START TRANSACTION' );
00284 }
00285
00291 public function commitTransaction()
00292 {
00293 return $this->getDb( false )->execute( 'COMMIT' );
00294 }
00295
00301 public function rollbackTransaction()
00302 {
00303 return $this->getDb( false )->execute( 'ROLLBACK' );
00304 }
00305
00314 public function setTransactionIsolationLevel( $sLevel = null )
00315 {
00316 $blResult = false;
00317
00318 $aLevels = array( 'READ UNCOMMITTED', 'READ COMMITTED', 'REPEATABLE READ', 'SERIALIZABLE' );
00319 if ( in_array( strtoupper( $sLevel ), $aLevels ) ) {
00320 $blResult = $this->getDb( false )->execute( 'SET TRANSACTION ISOLATION LEVEL ' . $sLevel );
00321 }
00322
00323 return $blResult;
00324 }
00325
00333 public function UI( $iPollSecs=5 )
00334 {
00335 $this->getDb( false )->UI( $iPollSecs );
00336 }
00337
00338 }