cvs: php4 /pear/DB ifx.php

From: Date: Thu, 27 Dec 2001 12:00:46 +0000
Subject: cvs: php4 /pear/DB ifx.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1709@lists.php.net to get a copy of this message
cox Thu Dec 27 07:00:46 2001 EDT Modified files: /php4/pear/DB ifx.php Log: enhance freeResult Index: php4/pear/DB/ifx.php diff -u php4/pear/DB/ifx.php:1.16 php4/pear/DB/ifx.php:1.17 --- php4/pear/DB/ifx.php:1.16 Tue Dec 11 10:31:15 2001 +++ php4/pear/DB/ifx.php Thu Dec 27 07:00:45 2001 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: ifx.php,v 1.16 2001/12/11 15:31:15 sebastian Exp $ +// $Id: ifx.php,v 1.17 2001/12/27 12:00:45 cox Exp $ // // Database independent query interface definition for PHP's Informix // extension. @@ -27,7 +27,8 @@ // http://www.informix.com/answers/english/ierrors.htm // // TODO: -// -set needed env Informix vars on connect +// - set needed env Informix vars on connect +// - implement native prepare/execute require_once 'DB/common.php'; @@ -244,9 +245,17 @@ */ function freeResult($result) { - if (!@ifx_free_result($result)) { - return $this->ifxraiseError(); + if (is_resource($result)) { + if (!@ifx_free_result($result)) { + return $this->ifxraiseError(); + } + return true; + } + 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 (#1709) next »