php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2300 Can't select STRING (VARCHAR) values from the Oracle DB
Submitted: 1999-09-15 00:00 UTC Modified: 2006-07-17 08:52 UTC
From: admin at polad dot ru Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 3.0.12 OS: RedHat Linux 5.0 (kernel 2.0.38)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: admin at polad dot ru
New email:
PHP Version: OS:

 

 [1999-09-15 00:00 UTC] admin at polad dot ru
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);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-16 04:09 UTC] thies at cvs dot php dot net
Andrew said: 
Sorry, the problem was in Oracle client.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 22:01:28 2024 UTC