[PHP-DEV] Bug #2300: Can't select STRING (VARCHAR) values from the Oracle DB From: admin <email protected>
Date: 09/15/99

From: admin <email protected>
Operating system: RedHat Linux 5.0 (kernel 2.0.38)
PHP version: 3.0.12
PHP Bug Type: Oracle related
Bug description: Can't select STRING (VARCHAR) values from the Oracle DB

OCIResult normaly gets the number and date values but it doesn't get varchar values.

  $conn = OCILogon("polad_sys", "polad_sys", "POLAD5-TCP.world");

  $sql = "select * from test";
  $stat = OCIParse($conn, $sql);

  OCIExecute($stat, OCI_DEFAULT);
  
  while (OCIFetch($stat)) {

    $ncols = OCINumCols($stat);
    for ( $i = 1; $i <= $ncols; $i++ ) {
      $result = OCIResult($stat, $i); /* !!!! */
      print $result; /* using $result[1] I get the first char of the string */
      echo "<BR>";
    }
    echo "</TR>";
  }

  OCIFreeStatement($stat);
  OCILogoff($conn);

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>