web/lib/Zend/Db/Statement/Sqlsrv.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Db
    16  * @package    Zend_Db
    17  * @subpackage Statement
    17  * @subpackage Statement
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: Sqlsrv.php 21887 2010-04-16 18:28:10Z juokaz $
    20  * @version    $Id: Sqlsrv.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    24  * @see Zend_Db_Statement
    24  * @see Zend_Db_Statement
    25  */
    25  */
    29  * Extends for Microsoft SQL Server Driver for PHP
    29  * Extends for Microsoft SQL Server Driver for PHP
    30  *
    30  *
    31  * @category   Zend
    31  * @category   Zend
    32  * @package    Zend_Db
    32  * @package    Zend_Db
    33  * @subpackage Statement
    33  * @subpackage Statement
    34  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    36  */
    36  */
    37 class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
    37 class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
    38 {
    38 {
    39 
    39 
   374     {
   374     {
   375         if (sqlsrv_next_result($this->_stmt) === false) {
   375         if (sqlsrv_next_result($this->_stmt) === false) {
   376             require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
   376             require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
   377             throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
   377             throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
   378         }
   378         }
   379 		
   379         
   380 		// reset column keys
   380         // reset column keys
   381 		$this->_keys = null;
   381         $this->_keys = null;
   382 
   382 
   383 		return true;
   383         return true;
   384     }
   384     }
   385 
   385 
   386     /**
   386     /**
   387      * Returns the number of rows affected by the execution of the
   387      * Returns the number of rows affected by the execution of the
   388      * last INSERT, DELETE, or UPDATE statement executed by this
   388      * last INSERT, DELETE, or UPDATE statement executed by this
   409             throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
   409             throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
   410         }
   410         }
   411 
   411 
   412         return $num_rows;
   412         return $num_rows;
   413     }
   413     }
   414 	
   414     
   415 	/**
   415     /**
   416      * Returns an array containing all of the result set rows.
   416      * Returns an array containing all of the result set rows.
   417      *
   417      *
   418      * @param int $style OPTIONAL Fetch mode.
   418      * @param int $style OPTIONAL Fetch mode.
   419      * @param int $col   OPTIONAL Column number, if fetch mode is by column.
   419      * @param int $col   OPTIONAL Column number, if fetch mode is by column.
   420      * @return array Collection of rows, each in a format by the fetch mode.
   420      * @return array Collection of rows, each in a format by the fetch mode.