From: tony at marston-home dot demon dot co dot uk Operating system: Windows XP PHP version: 4.4.4 PHP Bug Type: OCI8 related Bug description: ORA-00932: inconsistent datatypes, expected CHAR got ARRAY
Description: ------------ Oracle version 10g Express Edition. I have a table which contains a VARRAY, a user-defned type. When I attempt to read this table I get the error "ORA-00932: inconsistent datatypes, expected CHAR got ARRAY". Reproduce code: --------------- Here is my table defintion, with the VARRAY datatype: [code] CREATE OR REPLACE TYPE t_fav_food IS VARRAY(10) OF NUMBER(2); CREATE TABLE person ( person_id varchar2(8) NOT NULL, first_name varchar2(20) NOT NULL, last_name varchar2(30) NOT NULL, favourite_food t_fav_food, PRIMARY KEY (person_id) ); [/code] Here s the code that I use to access it: [code] $array = array(); $query = 'SELECT person_id, first_name, last_name, favourite_food FROM person'; $statement = ociParse($conn, $query); $result = ociExecute($statement); while (ociFetchInto ($statement, $row, OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS)) { $array[] = array_change_key_case($row, CASE_LOWER); } // while [/code] I get the error "ORA-00932: inconsistent datatypes, expected CHAR got ARRAY" when performing ociFetchInto() Expected result: ---------------- I expect ociFetchInto() to load the VARRAY column as a collection object which I can then access using the OCI-Collection-> methods, just as I can with large objects and the OCI-Lob-> methods. -- Edit bug report at http://bugs.php.net/?id=39887&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39887&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39887&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39887&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39887&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39887&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39887&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39887&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39887&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39887&r=support Expected behavior: http://bugs.php.net/fix.php?id=39887&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39887&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39887&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39887&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39887&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39887&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39887&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39887&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39887&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39887&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39887&r=mysqlcfg