cvs: pear /DB/DB common.php mysql.php

From: Date: Sun, 20 Feb 2005 16:29:21 +0000
Subject: cvs: pear /DB/DB common.php mysql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-29533@lists.php.net to get a copy of this message
danielc Sun Feb 20 11:29:21 2005 EDT Modified files: /pear/DB/DB common.php mysql.php Log: * If you want to use mysql_unbuffered_query() set the "buffer" option to 1 using setOptions(). Request 2813. http://cvs.php.net/diff.php/pear/DB/DB/common.php?r1=1.129&r2=1.130&ty=u Index: pear/DB/DB/common.php diff -u pear/DB/DB/common.php:1.129 pear/DB/DB/common.php:1.130 --- pear/DB/DB/common.php:1.129 Sun Feb 20 11:05:12 2005 +++ pear/DB/DB/common.php Sun Feb 20 11:29:19 2005 @@ -20,7 +20,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: common.php,v 1.129 2005/02/20 16:05:12 danielc Exp $ + * @version CVS: $Id: common.php,v 1.130 2005/02/20 16:29:19 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -516,7 +516,9 @@ * </li><li> * <var>buffer</var> <kbd>integer</kbd> = <samp>1000</samp> * <br />how many rows of the result set should be buffered? - * This is only used by the oci8 driver at this point. + * <br />In mysql: mysql_unbuffered_query() is used instead of + * mysql_query() if this value is 1. + * <br />In oci8: this value is passed to ocisetprefetch(). * </li><li> * <var>debug</var> <kbd>integer</kbd> = <samp>0</samp> * <br />debug level http://cvs.php.net/diff.php/pear/DB/DB/mysql.php?r1=1.109&r2=1.110&ty=u Index: pear/DB/DB/mysql.php diff -u pear/DB/DB/mysql.php:1.109 pear/DB/DB/mysql.php:1.110 --- pear/DB/DB/mysql.php:1.109 Sat Feb 19 19:44:48 2005 +++ pear/DB/DB/mysql.php Sun Feb 20 11:29:19 2005 @@ -20,7 +20,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysql.php,v 1.109 2005/02/20 00:44:48 danielc Exp $ + * @version CVS: $Id: mysql.php,v 1.110 2005/02/20 16:29:19 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -282,6 +282,10 @@ /** * Sends a query to the database server * + * Generally uses mysql_query(). If you want to use + * mysql_unbuffered_query() set the "buffer" option to 1 using + * setOptions(). + * * @param string the SQL query string * * @return mixed + a PHP result resrouce for successful SELECT queries @@ -308,7 +312,11 @@ } $this->transaction_opcount++; } - $result = @mysql_query($query, $this->connection); + if ($this->options['buffer'] == 1) { + $result = @mysql_unbuffered_query($query, $this->connection); + } else { + $result = @mysql_query($query, $this->connection); + } if (!$result) { return $this->mysqlRaiseError(); }

« previous php.pear.cvs (#29533) next »