OCIPLogon (fwd)
| From: | Radu Filip | Date: | Fri, 29 Sep 2000 11:46:53 +0000 |
| Subject: | OCIPLogon (fwd) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18031@lists.php.net to get a copy of this message | ||
Hi!
OCIPLogon documentation page says:
"OCIPLogon -- Connect to an Oracle database and log on using a persistant
connection. Returns a new session. [...] OCIPLogon() creates a persistent
connection to an Oracle 8 database and logs on."
What I did not understand:
1) "Returns a new session". This means that it is created a new
session that overwrites the existed one?
2) What exactly means here "persistant connection"? I know
theoretically, what it means, but in this very practical situation
how it really works? Does it means that:
a) connection descriptor returned by function must be
registered using session_register() in order to be available
for subsequent pages?
<?
$c = OCIPLogon("test", "user");
session_register("c");
?>
b) at the end of current page there is no need to call OCILogoff?
$ cat 1.php
<?
$c = OCIPLogon("test", "user");
session_register("c");
echo "<a href=\"2.php\">2.php</a>";
?>
$ cat 2.php
<?
session_start();
// performing query of database using connection descriptor
// from $c
OCILogoff($c);
?>
Thx,
Radu
--
Radu Filip
Network Administrator @CCTI | tuiasi.ro
radu@tuiasi.ro ccti@tuiasi.ro
http://socrate.tuiasi.ro/ http://www.ccti.tuiasi.ro/