Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: oracle and php3
In article <375E44EB.7D90F9A1_at_tfh-wildau.de>,
Frank Rast <frast_at_tfh-wildau.de> wrote:
> I want to use an Oracle Database with a PHP3 Web-Application.
> My problem is that I do not know how to write the connect string
> (TNSNAME).
> The Syntax is Ora_Logon("user_at_tnsname", "password") where user is a
> valid user of the database. If anybody knows the correct syntax of
> tnsname I would be grateful if you answer my Question. My Database is
> running on another machine than the HTTP Server so I think I have to
> qualify the full name of the Database.
if ($conn < 0) { echo("Could not connect to Oracle.\n"); $good="no"; exit; }
$seq_cur = Ora_Open($conn);
if ($seq_cur < 0) { echo("Could not open a cursor.\n"); Ora_Logoff($conn); $good="no"; exit; } $sql = "select hdi_ucontent.nextval from dual"; if (Ora_Parse($seq_cur, $sql) < 0) { echo("Parse failed!\n"); Ora_Logoff($conn); $good="no"; exit; } $ncols = Ora_Exec($seq_cur);
$fname=$col;
Ora_Close($seq_cur);
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Jun 09 1999 - 07:10:32 CDT