[ Index ] |
|
Code source de Symfony 1.0.0 |
1 <?php 2 /* 3 * $Id: MSSQLStatement.php,v 1.4 2004/06/13 02:31:07 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/common/StatementCommon.php'; 23 require_once 'creole/Statement.php'; 24 25 /** 26 * Class that contains MSSQL functionality for Statements. 27 * 28 * @author Hans Lellelid <hans@xmpl.org> 29 * @version $Revision: 1.4 $ 30 * @package creole.drivers.mssql 31 */ 32 class MSSQLStatement extends StatementCommon implements Statement { 33 34 /** 35 * Executes the SQL query in this PreparedStatement object and returns the resultset generated by the query. 36 * 37 * @param string $sql This method may optionally be called with the SQL statement. 38 * @param int $fetchmode The mode to use when fetching the results (e.g. ResultSet::FETCHMODE_NUM, ResultSet::FETCHMODE_ASSOC). 39 * @return object Creole::ResultSet 40 * @throws SQLException If there is an error executing the specified query. 41 */ 42 public function executeQuery($sql, $fetchmode = null) 43 { 44 $this->updateCount = null; 45 $this->resultSet = $this->conn->executeQuery($sql, $fetchmode); 46 $this->resultSet->_setOffset($this->offset); 47 $this->resultSet->_setLimit($this->limit); 48 return $this->resultSet; 49 } 50 51 52 /** 53 * Gets next result set (if this behavior is supported by driver). 54 * Some drivers (e.g. MSSQL) support returning multiple result sets -- e.g. 55 * from stored procedures. 56 * 57 * This function also closes any current restult set. 58 * 59 * Default behavior is for this function to return false. Driver-specific 60 * implementations of this class can override this method if they actually 61 * support multiple result sets. 62 * 63 * @return boolean True if there is another result set, otherwise false. 64 */ 65 public function getMoreResults() 66 { 67 if ($this->resultSet) $this->resultSet->close(); 68 $this->resultSet = null; 69 return false; 70 } 71 72 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |