cvs: php4 /pear/DB fbsql.php ibase.php ifx.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php

From: Date: Mon, 29 Oct 2001 23:37:52 +0000
Subject: cvs: php4 /pear/DB fbsql.php ibase.php ifx.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1194@lists.php.net to get a copy of this message
fmk Mon Oct 29 18:37:52 2001 EDT Modified files: /php4/pear/DB sybase.php pgsql.php odbc.php oci8.php mysql.php mssql.php msql.php ifx.php ibase.php fbsql.php Log: Adding nextResult() function allowing batches of sql statements to be executed with one call to the query function.

Index: php4/pear/DB/sybase.php diff -u php4/pear/DB/sybase.php:1.24 php4/pear/DB/sybase.php:1.25 --- php4/pear/DB/sybase.php:1.24 Sat Oct 27 11:45:18 2001 +++ php4/pear/DB/sybase.php Mon Oct 29 18:37:52 2001 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: sybase.php,v 1.24 2001/10/27 15:45:18 cox Exp $ +// $Id: sybase.php,v 1.25 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Sybase // extension. @@ -110,6 +110,23 @@ // Determine which queries that should return data, and which // should return an error code only. return DB::isManip($query) ? DB_OK : $result; + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal sybase result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; } // }}} Index: php4/pear/DB/pgsql.php diff -u php4/pear/DB/pgsql.php:1.54 php4/pear/DB/pgsql.php:1.55 --- php4/pear/DB/pgsql.php:1.54 Sat Oct 27 17:02:52 2001 +++ php4/pear/DB/pgsql.php Mon Oct 29 18:37:52 2001 @@ -17,7 +17,7 @@ // | Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.54 2001/10/27 21:02:52 cox Exp $ +// $Id: pgsql.php,v 1.55 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's PostgreSQL // extension. @@ -199,6 +199,23 @@ $this->affected = 0; return DB_OK; } + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal pgsql result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; } // }}} Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.43 php4/pear/DB/odbc.php:1.44 --- php4/pear/DB/odbc.php:1.43 Sat Oct 27 10:01:21 2001 +++ php4/pear/DB/odbc.php Mon Oct 29 18:37:52 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: odbc.php,v 1.43 2001/10/27 14:01:21 cox Exp $ +// $Id: odbc.php,v 1.44 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's ODBC // extension. @@ -170,6 +170,23 @@ } $this->row[$result] = 0; return $result; + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal odbc result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return odbc_next_result($result); } // }}} Index: php4/pear/DB/oci8.php diff -u php4/pear/DB/oci8.php:1.31 php4/pear/DB/oci8.php:1.32 --- php4/pear/DB/oci8.php:1.31 Sat Oct 27 10:01:19 2001 +++ php4/pear/DB/oci8.php Mon Oct 29 18:37:52 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: oci8.php,v 1.31 2001/10/27 14:01:19 cox Exp $ +// $Id: oci8.php,v 1.32 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Oracle 8 // call-interface extension. @@ -156,6 +156,23 @@ // Determine which queries that should return data, and which // should return an error code only. return DB::isManip($query) ? DB_OK : $result; + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal oracle result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; } // }}} Index: php4/pear/DB/mysql.php diff -u php4/pear/DB/mysql.php:1.79 php4/pear/DB/mysql.php:1.80 --- php4/pear/DB/mysql.php:1.79 Sat Oct 27 17:03:38 2001 +++ php4/pear/DB/mysql.php Mon Oct 29 18:37:52 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.79 2001/10/27 21:03:38 cox Exp $ +// $Id: mysql.php,v 1.80 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's MySQL // extension. @@ -218,6 +218,23 @@ return $result; } return DB_OK; + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal mysql result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; } // }}} Index: php4/pear/DB/mssql.php diff -u php4/pear/DB/mssql.php:1.32 php4/pear/DB/mssql.php:1.33 --- php4/pear/DB/mssql.php:1.32 Sat Oct 27 11:45:18 2001 +++ php4/pear/DB/mssql.php Mon Oct 29 18:37:52 2001 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.32 2001/10/27 15:45:18 cox Exp $ +// $Id: mssql.php,v 1.33 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Microsoft SQL Server // extension. @@ -111,6 +111,24 @@ // should return an error code only. return $ismanip ? DB_OK : $result; } + + // {{{ nextResult() + + /** + * Move the internal mssql result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return mssql_next_result($result); + } + + // }}} function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) { Index: php4/pear/DB/msql.php diff -u php4/pear/DB/msql.php:1.21 php4/pear/DB/msql.php:1.22 --- php4/pear/DB/msql.php:1.21 Sat Oct 27 10:01:18 2001 +++ php4/pear/DB/msql.php Mon Oct 29 18:37:52 2001 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: msql.php,v 1.21 2001/10/27 14:01:18 cox Exp $ +// $Id: msql.php,v 1.22 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Mini-SQL // extension. @@ -91,6 +91,24 @@ // should return an error code only. return DB::isManip($query) ? DB_OK : $result; } + + // {{{ nextResult() + + /** + * Move the internal msql result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; + } + + // }}} function fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) { Index: php4/pear/DB/ifx.php diff -u php4/pear/DB/ifx.php:1.13 php4/pear/DB/ifx.php:1.14 --- php4/pear/DB/ifx.php:1.13 Sat Oct 27 10:01:18 2001 +++ php4/pear/DB/ifx.php Mon Oct 29 18:37:52 2001 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: ifx.php,v 1.13 2001/10/27 14:01:18 cox Exp $ +// $Id: ifx.php,v 1.14 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Informix // extension. @@ -133,6 +133,24 @@ } return DB_OK; } + + // {{{ nextResult() + + /** + * Move the internal ifx result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; + } + + // }}} /** * Gets the number of rows affected by the last query. Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.24 php4/pear/DB/ibase.php:1.25 --- php4/pear/DB/ibase.php:1.24 Sat Oct 27 10:01:18 2001 +++ php4/pear/DB/ibase.php Mon Oct 29 18:37:52 2001 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.24 2001/10/27 14:01:18 cox Exp $ +// $Id: ibase.php,v 1.25 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -96,6 +96,24 @@ // should return an error code only. return DB::isManip($query) ? DB_OK : $result; } + + // {{{ nextResult() + + /** + * Move the internal ibase result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return false; + } + + // }}} function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT) { Index: php4/pear/DB/fbsql.php diff -u php4/pear/DB/fbsql.php:1.9 php4/pear/DB/fbsql.php:1.10 --- php4/pear/DB/fbsql.php:1.9 Sat Oct 27 10:01:18 2001 +++ php4/pear/DB/fbsql.php Mon Oct 29 18:37:52 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.9 2001/10/27 14:01:18 cox Exp $ +// $Id: fbsql.php,v 1.10 2001/10/29 23:37:52 fmk Exp $ // // Database independent query interface definition for PHP's FrontBase // extension. @@ -187,6 +187,23 @@ } $this->num_rows[$result] = $numrows; return $result; + } + + // }}} + // {{{ nextResult() + + /** + * Move the internal fbsql result pointer to the next available result + * + * @param a valid fbsql result resource + * + * @access public + * + * @return true if a result is available otherwise return false + */ + function nextResult($result) + { + return @fbsql_next_result($result); } // }}}
« previous php.pear.cvs (#1194) next »