Hey guys,

First a quick question. Is there something wrong with the PHP.net site? If you view oci_fetch you'll see that it states it might only be available in the CSV where it actually is in the PHP release since 3.0.4.

Then about the OCIFETCH function

I have the following problem. I'm fetching two values 'keyword and title'

Know i do a while ocifetch problem is php won't fetch a thing if one of the values is a null value. Wich off course is the case. Title is always inserted but keyword isn't. Is there a way to by pass this and just fetch the title and leave keyword empty?

Thx in advance

    set the default value to an empty string instead of a null in oracle...then it always returns something

    we have a similiar problem with mysql and myodbc drivers (ASP) and that is our solution

      I solved halve of my problem by using ocifetchinto and setting the parameter OCI_RETURN_NULLS. Know still an error is fired when i try to fetch without there being a single record in the resultset.

      if i do this

      ocifetchinto($stmt, $result, OCI_ASSOC+OCI_RETURN_NULLS)or die("Shot during fetch :)");
      

      And the recordset is empty i get Shot during fetch.

      Is there away to by pass this? . . .
      that is easier then this construction:

      if(oci_num_rows($stmt)>0){
        ocifetchinto($stmt, $result, OCI_ASSOC+OCI_RETURN_NULLS)or die("Shot during fetch :)");
      }
      

      TIA

        Write a Reply...