3 require_once
'interface/DatabaseInterface.php';
35 $this->_oDb = $oConnection;
43 $this->_oDb->setFetchMode($iFetchMode);
56 public function getDb($blType =
true)
65 public function getOne($sSql, $aParams = array(), $blType =
true)
67 return $this->
getDb($blType)->getOne($sSql, $aParams);
81 public function getArray($sSql, $aParams = array(), $blType =
true)
83 return $this->
getDb($blType)->getArray($sSql, $aParams);
89 public function getRow($sSql, $aParams = array(), $blType =
true)
91 return $this->
getDb($blType)->getRow($sSql, $aParams);
97 public function getAll($sSql, $aParams = array(), $blType =
true)
100 return $this->
getDb($blType)->getAll($sSql, $aParams);
106 public function select($sSql, $aParams = array(), $blType =
true)
108 return $this->
getDb($blType)->execute($sSql, $aParams);
123 public function getAssoc($sSql, $aParams = array(), $blType =
true)
125 return $this->
getDb($blType)->getAssoc($sSql, $aParams);
131 public function getCol($sSql, $aParams = array(), $blType =
true)
133 return $this->
getDb($blType)->getCol($sSql, $aParams);
139 public function selectLimit($sSql, $iRows = -1, $iOffset = -1, $aParams = array(), $blType =
true)
141 return $this->
getDb($blType)->SelectLimit($sSql, $iRows, $iOffset, $aParams);
147 public function execute($sSql, $aParams = array())
149 return $this->
getDb(
false)->execute($sSql, $aParams);
162 public function query($sSql, $aParams = array())
164 return $this->
getDb(
false)->Query($sSql, $aParams);
177 return $this->
getDb(
false)->Affected_Rows();
190 return $this->
getDb(
false)->ErrorNo();
203 return $this->
getDb(
false)->ErrorMsg();
217 return $this->
getDb(
false)->qstr($sValue);
225 return $this->
getDb(
false)->quote($sValue);
233 foreach ($aStrArray as $sKey => $sString) {
234 $aStrArray[$sKey] = $this->
quote($sString);
245 return $this->
getDb(
false)->MetaColumns($sTable);
260 return $this->
getDb(
false)->MetaColumnNames($sTable, $blNumIndexes);
268 return $this->
getDb(
false)->execute(
'START TRANSACTION');
276 return $this->
getDb(
false)->execute(
'COMMIT');
284 return $this->
getDb(
false)->execute(
'ROLLBACK');
294 $aLevels = array(
'READ UNCOMMITTED',
'READ COMMITTED',
'REPEATABLE READ',
'SERIALIZABLE');
295 if (in_array(strtoupper($sLevel), $aLevels)) {
296 $blResult = $this->
getDb(
false)->execute(
'SET TRANSACTION ISOLATION LEVEL ' . $sLevel);
309 public function UI($iPollSecs = 5)
311 $this->
getDb(
false)->UI($iPollSecs);
334 return $this->
getDb(
false)->Insert_ID();