[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/creole/drivers/odbc/ -> ODBCStatement.php (source)

   1  <?php
   2  /*
   3   *  $Id: ODBCStatement.php,v 1.1 2004/07/27 23:08:30 hlellelid Exp $
   4   *
   5   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   6   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   7   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   8   * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   9   * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13   * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16   *
  17   * This software consists of voluntary contributions made by many individuals
  18   * and is licensed under the LGPL. For more information please see
  19   * <http://creole.phpdb.org>.
  20   */
  21  
  22  require_once 'creole/Statement.php';
  23  require_once 'creole/common/StatementCommon.php';
  24  
  25  /**
  26   * ODBC Statement
  27   *
  28   * @author    Dave Lawson <dlawson@masterytech.com>
  29   * @version   $Revision: 1.1 $
  30   * @package   creole.drivers.odbc
  31   */
  32  class ODBCStatement extends StatementCommon implements Statement
  33  {
  34      /**
  35       * @see Statement::executeQuery()
  36       */
  37      public function executeQuery($sql, $fetchmode = null)
  38      {
  39          if ($this->resultSet)
  40          {
  41              $this->resultSet->close();
  42              $this->resultSet = null;
  43          }
  44  
  45          $this->updateCount = null;
  46  
  47          if ($this->conn->getAdapter()->hasLimitOffset())
  48          {
  49              if ($this->limit > 0 || $this->offset > 0)
  50                  $this->conn->applyLimit($sql, $this->offset, $this->limit);
  51          }
  52  
  53          $this->resultSet = $this->conn->executeQuery($sql, $fetchmode);
  54  
  55          if (!$this->conn->getAdapter()->hasLimitOffset())
  56          {
  57              $this->resultSet->_setOffset($this->offset);
  58              $this->resultSet->_setLimit($this->limit);
  59          }
  60  
  61          return $this->resultSet;
  62      }
  63  
  64  }


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7