Re: closing an ODBC connection to mysql
| From: | ben | Date: | Wed, 19 Dec 2001 23:56:38 +0000 |
| Subject: | Re: closing an ODBC connection to mysql | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11027@lists.php.net to get a copy of this message | ||
George
Thank you. I didn't understand the meaning of the "void" preceding the
syntax in the statement. I should have looked this up, and have now. Thank
you for pointing me in the right direction - much apreciated!
Ben
"George Nicolae" <geomasterweb@hotmail.com> wrote in message
news:20011218235047.34754.qmail@pb1.pair.com...
> odbc_close($link) is a void function. didn't return anything. look in
> documentation at odbc_close();
>
> --
>
>
> Best regards,
> George Nicolae
> IT Manager
> ___________________
> X-Playin - Professional Web Design
> www.x-playin.f2s.com
>
>
>
> "Ben" <bmf1@ukonline.co.uk> wrote in message
> news:20011218233705.24807.qmail@pb1.pair.com...
> > Hello
> >
> > I've installed mysql and php on W2K with IIS5.0 and I'm having some
> trouble
> > closing my connection, which is established via odbc.
> >
> > I have been using the following php code to connect:
> >
> > $link = odbc_connect("forum", "ben", "dulwich")
> > or die("Could not connect");
> > print "Connected successfully";
> >
> >
> >
> > This connects successfully. I then execute my query, which returns a
> result.
> > All is fine so far.
> >
> > Unfortunately, when I come to close the connection, I have a problem:
> >
> > mysql_free_result ($result);
> >
> > print "Connection about to be closed";
> > // Closing connection
> > odbc_close($link)
> > or die ("connection not closed");
> > It always prints "connection not closed". Is this because the connection
> is
> > not closing, or simply that the "or die" option is not applicable for
the
> > statement "odbc_close()"? I've read the manual and been through
tutorials
> > etc but haven't found any conclusive answers on this, and I'd be
gratefull
> > for any help!
> >
> > Thanks very much in advance.
> >
> > Ben
> >
> >
>
>