00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 require_once 'creole/Statement.php';
00023 require_once 'creole/common/StatementCommon.php';
00024
00032 class ODBCStatement extends StatementCommon implements Statement
00033 {
00037 public function executeQuery($sql, $fetchmode = null)
00038 {
00039 if ($this->resultSet)
00040 {
00041 $this->resultSet->close();
00042 $this->resultSet = null;
00043 }
00044
00045 $this->updateCount = null;
00046
00047 if ($this->conn->getAdapter()->hasLimitOffset())
00048 {
00049 if ($this->limit > 0 || $this->offset > 0)
00050 $this->conn->applyLimit($sql, $this->offset, $this->limit);
00051 }
00052
00053 $this->resultSet = $this->conn->executeQuery($sql, $fetchmode);
00054
00055 if (!$this->conn->getAdapter()->hasLimitOffset())
00056 {
00057 $this->resultSet->_setOffset($this->offset);
00058 $this->resultSet->_setLimit($this->limit);
00059 }
00060
00061 return $this->resultSet;
00062 }
00063
00064 }