Update of /cvsroot/phplib/php-lib-stable/php
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5796/php
Modified Files:
db_mysql.inc db_odbc.inc
Log Message:
add disconnect() to allow better use of non-persistent connections
Index: db_mysql.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** db_mysql.inc 19 Feb 2005 15:20:18 -0000 1.13
--- db_mysql.inc 12 Jan 2007 20:25:30 -0000 1.14
***************
*** 98,101 ****
--- 98,108 ----
}
+ function disconnect() {
+ if(!$this->PConnect and $this->Link_ID) {
+ mysql_close($this->Link_ID);
+ $this->Link_ID = 0;
+ }
+ }
+
/* public: discard the query result */
function free() {
Index: db_odbc.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/db_odbc.inc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** db_odbc.inc 23 Jul 2004 20:36:29 -0000 1.6
--- db_odbc.inc 12 Jan 2007 20:25:30 -0000 1.7
***************
*** 98,101 ****
--- 98,108 ----
}
+ function disconnect() {
+ if($this->Link_ID) {
+ odbc_close($this->Link_ID);
+ $this->Link_ID = 0;
+ }
+ }
+
/* public: discard the query result */
function free() {
|