cvs: php4 /pear/DB odbc.php

From: Date: Wed, 19 Dec 2001 17:35:43 +0000
Subject: cvs: php4 /pear/DB odbc.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1624@lists.php.net to get a copy of this message
cox Wed Dec 19 12:35:43 2001 EDT Modified files: /php4/pear/DB odbc.php Log: free the result when is a resource or free the statement if not in freeResult() Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.48 php4/pear/DB/odbc.php:1.49 --- php4/pear/DB/odbc.php:1.48 Tue Dec 11 10:31:18 2001 +++ php4/pear/DB/odbc.php Wed Dec 19 12:35:43 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: odbc.php,v 1.48 2001/12/11 15:31:18 sebastian Exp $ +// $Id: odbc.php,v 1.49 2001/12/19 17:35:43 cox Exp $ // // Database independent query interface definition for PHP's ODBC // extension. @@ -248,8 +248,16 @@ function freeResult($result) { - $err = odbc_free_result($result); // XXX ERRORMSG - return $err; + if (is_resource($result)) { + // Always return true + return odbc_free_result($result); + } + if (!isset($this->prepare_tokens[(int)$result])) { + return false; + } + unset($this->prepare_tokens[(int)$result]); + unset($this->prepare_types[(int)$result]); + return true; } // }}}

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