Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> You may want to try PHP!

You may want to try PHP!

From: Kristy <nobody_at_home.com>
Date: 2000/04/13
Message-ID: <38f5f3da.160697892@client.sw.news.psi.net>#1/1

Jerry 'the god' provided this small example:

small example

<?php

$db = "fm";
$conn = OCIPLogon("a","b",$db);

$stmt_tytul = OCIParse($conn,"select ing_tytul from gp_informacje");
$stmt_lead = OCIParse($conn,"select ing_lead from gp_informacje");
$stmt_tresc = OCIParse($conn,"select ing_tresc from gp_informacje");

OCIExecute($stmt_tytul);

OCIExecute($stmt_lead);
OCIExecute($stmt_tresc);

$tytul_rows = OCIFetchStatement($stmt_tytul,$results_tytul); $lead_rows = OCIFetchStatement($stmt_lead,$results_lead);

   for ( $i = 0; $i < 3; $i++ ) {

      reset($results_tytul);
      reset($results_lead);
      print "<TR>\n";
      while ( $column = each($results_tytul) ) {
         $data = $column['value'];
         print "<TD>$data[$i]</TD>\n";
         print "<br\n>";
        }
      print "</TR>\n";

   }
# print "</TABLE>\n";

OCIFreeStatement($stmt_tytul);
OCILogoff($conn);

?>

Jerry

Kristy wrote:

> Hi everybody! <--Dr. Nick voice-->

>

> Are there any good PHP + Oracle examples out there? I just need the
> basics:
>

> 0) how to connect and login
>

> 1) how to execute a select statement
>

> 2) how to execute a stored procedure or package
>

> So far, all the books and online stuff talks about MySQL which does me
> no good.
>

> A little help please,
> Kristy

On Wed, 12 Apr 2000 20:43:26 -0400, "Huy Vu" <huyv_at_usa.net> wrote:

>Hi all,
>
>I'm trying to connect to an Oracle database from my webpage.
>I heart Perl can connect to the relational database but exactly what pieces
>I should install on top my Apache web server to talk with a relational
>database?
>
>What is the quickest and easy way to do that?
>
>Thanks in  advance for any  advise.
>
>H.V
>
>
Received on Thu Apr 13 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US