Announcement

Collapse
No announcement yet.

SELECT-Abfrage aus php ohne Inhalt?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SELECT-Abfrage aus php ohne Inhalt?

    Hallo zusammen!

    Zunächst einmal sei gesagt, dass ich, was Oracle angeht, ein totaler Neuling bin.

    Ich habe auf meinem Computer (Ubuntu 10.04) Oracle XE 10g installiert. Nun scheitere ich allerdings schon bei einer einfachen SELECT-Abfrage einer vorhandenen Tabelle. Dazu folgender Code:

    PHP Code:
    <?php
        putenv
    ('ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/');
        
    $oracle oci_connect('hr''hr''//localhost/XE');

        if (!
    $oracle)    {
            
    $e oci_error();
            echo 
    htmlentities($e['message']);
            exit;
        }
        
    $abfrage oci_parse($oracle'SELECT * FROM JOBS');
        
    oci_execute($abfage);
        echo 
    oci_num_rows($abfrage);
    ?>
    Bildschirmausgabe ist schlicht
    Code:
    0
    , dabei enthält die vordefinierte Tabelle JOBS ca. 20 Einträge!

    Auszug aus phpinfo:
    Code:
    oci8
    OCI8 Support 	enabled
    Version 	1.4.5
    Revision 	$Revision: 305257 $
    Active Persistent Connections 	0
    Active Connections 	0
    Oracle Version 	10.2
    Compile-time ORACLE_HOME 	/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    Libraries Used 	-Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -lclntsh
    Temporary Lob support 	enabled
    Collections support 	enabled
    
    Directive	Local Value	Master Value
    oci8.connection_class	no value	no value
    oci8.default_prefetch	100	100
    oci8.events	Off	Off
    oci8.max_persistent	-1	-1
    oci8.old_oci_close_semantics	Off	Off
    oci8.persistent_timeout	-1	-1
    oci8.ping_interval	60	60
    oci8.privileged_connect	Off	Off
    oci8.statement_cache_size	20	20
    Hat jemand eine Idee, woran das liegen könnte und wie ich dem Abhilfe schaffen kann?

    Danke und Gruß,
    Fant

  • #2
    versuch mal vor dem "oci_num_rows()" ein "oci_fetch_all()" ...

    Gruß,
    Eric

    Comment

    Working...
    X