RE: [PHP-DEV] An error From: Janis Berzins (ISD ALN) (jberzin3 <email protected>)
Date: 03/06/99

> > Line 5 contains:
> > $conn = ora_login("test/passwd <email protected>", "");
> >
> > Any idea?
>
> There is no parse error on that line. Look at the lines
> around that one.
>
> -Rasmus

The whole code...

<?
 dl(php3_oci73)
// putenv("ORACLE_SID=SID"); - as Ora is on remota machine.
// putenv("ORACLE_HOME=/opt/oracle/oracle/8.0.3");
  $conn = ora_login("user/passw <email protected>", "");
  $curs = ora_open($conn);

  ora_commitoff($conn);

  $query = sprintf("select * from ki_customer_groups");

/* Long version */
/*
  ora_parse($curs, $query);
  ora_exec($curs);
  ora_fetch($curs);
*/
/* Short Version */
  ora_do($conn, $query);

  $ncols = ora_numcols($curs);
  $nrows = ora_numrows($curs);
  printf("Result size is $ncols cols by $nrows rows.<br>");

  for ($i=0; $i<$ncols; $i++) {
    printf("col[%s] = %s type[%d] = %s<br>",
      $i, ora_columnname($curs, $i),
      $i, ora_columntype($curs, $i));
  }

  for ($j=0; $j<$nrows; $j++) {
    for ($i=0; $i<$ncols; $i++) {
      $col = ora_getcolumn($curs, $i);
      printf("val[%d, %d] = %s * ", $j, $i, ora_getcolumn($curs, $i);
    }
    printf("<br>");
  }
 ?>

as you can seee it is a part of online php3 manual.
Maybe there can be some broblem with php configuration?

Thanx,
jb

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>