Subject Re: [firebird-php] Warning on ibase_close() function
Author Milan Babuskov
Alan McDonald wrote:
> <?
> $dbh =
> ibase_connect('servername/3051:c:\\path\\database.gdb','sysdba','masterkey',
> 'ISO8859_1',0,1);
> $sth = ibase_query('SELECT content_html FROM content');
> while ($row = ibase_fetch_row($sth)) {
> print $row->content_html."\n";
> ibase_blob_echo($row[0]);
> }
> ibase_free_result($sth);
> ibase_close($DBH);
> ?>

> AH - ha! - it's the uppercase DBH - lowercase does not give the warning
> sorry

:)

Yup, that's it, $DBH is uninitialized variable (defaults to 0).
If you only have one connection, you can use plain ibase_close(), and
not think about it, or even better, don't use it at all. The connection
will close it self at the end of script execution. That way you don't
have to worry about switching from connect() to pconnect() anytime you like.

--
Milan Babuskov
http://fbexport.sourceforge.net