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