Results 1 to 3 of 3

Thread: Oracle and PHP

  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Red face Unanswered: Oracle and PHP

    hi all,
    I use to get an error while retrieving data from oracle databse.

    Warning: ociparse(): supplied argument is not a valid OCI8-Connection resource in
    Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource in
    Warning: ocirowcount(): supplied argument is not a valid OCI8-Statement resource in
    Warning: ocifetch (): supplied argument is not a valid OCI8-Statement resource in

    In the mean time Im not getting any error but its not retrieving the data.

    Part of my script:

    <?php
    $iDBConn = ocilogon("tiger", "scott", "oracldb"); $qGetEmployees = "SELECT STAFF_ENNAME FROM HR_STAFF_MAST";

    $iStatement = @OCIParse($iDBConn, $qGetEmployees);
    @OCIExecute($iStatement, OCI_DEFAULT);
    // check our query

    $arrError = OCIError($iStatement);
    if ($arrError['code'])
    {
    print $arrError['message'];
    exit;
    }
    while (OCIFetch($iStatement) ) {
    echo"<tr>";
    if(!empty($iStatement))
    {
    $result=OCIResult($iStatement, "STAFF_ENNAME");{
    ?>

    I also tried $iDBConn = oci_connect("tiger", "scott", "oracldb");

    but, i'm getting the following error:

    Fatal error: Call to undefined function: oci_connect()

    Please advise
    hass_79

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: Oracle and PHP

    Originally posted by hass_79
    hi all,
    I use to get an error while retrieving data from oracle databse.

    Warning: ociparse(): supplied argument is not a valid OCI8-Connection resource in
    Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource in
    Warning: ocirowcount(): supplied argument is not a valid OCI8-Statement resource in
    Warning: ocifetch (): supplied argument is not a valid OCI8-Statement resource in

    In the mean time Im not getting any error but its not retrieving the data.

    Part of my script:

    <?php
    $iDBConn = ocilogon("tiger", "scott", "oracldb"); $qGetEmployees = "SELECT STAFF_ENNAME FROM HR_STAFF_MAST";

    $iStatement = @OCIParse($iDBConn, $qGetEmployees);
    @OCIExecute($iStatement, OCI_DEFAULT);
    // check our query

    $arrError = OCIError($iStatement);
    if ($arrError['code'])
    {
    print $arrError['message'];
    exit;
    }
    while (OCIFetch($iStatement) ) {
    echo"<tr>";
    if(!empty($iStatement))
    {
    $result=OCIResult($iStatement, "STAFF_ENNAME");{
    ?>

    I also tried $iDBConn = oci_connect("tiger", "scott", "oracldb");

    but, i'm getting the following error:

    Fatal error: Call to undefined function: oci_connect()

    Please advise
    hass_79
    Your PHP is not configured for OCI8 support

  3. #3
    Join Date
    Apr 2004
    Posts
    3

    Oracle and PHP

    It worked but, now i'm trying to use it with PHP class

    thanks
    hass_79

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •