ID:               40186
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tony at marston-home dot demon dot co dot uk
-Status:           Open
+Status:           Assigned
 Bug Type:         OCI8 related
 Operating System: Windows XP
 PHP Version:      5.2.0
 Assigned To:      tony2001


Previous Comments:
------------------------------------------------------------------------

[2007-01-31 10:37:03] tony at marston-home dot demon dot co dot uk

When I try the following:

$stmt  = ociParse($dbconn, "SELECT favourite_food FROM x_person");
oci_bind_array_by_name($stmt, 'favourite_food', $foods, 10, -1,
SQLT_NUM);
oci_execute($stmt);
while(oci_fetch($stmt)) {
   print_r($foods);
}

it fails with ORA-01036: illegal variable name/number.

When I try the following:

$stmt  = ociParse($dbconn, "SELECT :favourite_food FROM x_person");
oci_bind_array_by_name($stmt, ':favourite_food', $foods, 10, -1,
SQLT_NUM);
oci_execute($stmt);
while(oci_fetch($stmt)) {
   print_r($foods);
}

it fails with ORA-01484: arrays can only be bound to PL/SQL statements.

------------------------------------------------------------------------

[2007-01-30 19:38:25] [EMAIL PROTECTED]

You can and I've already pointed you out how to do it, but you don't
want even to try.

------------------------------------------------------------------------

[2007-01-30 19:21:43] tony at marston-home dot demon dot co dot uk

MySQL's SET datatype and PostgreSQL's ARRAY datatype are identical in
functionality to Oracle's VARRAY datatype in that they can hold arrays
of values instead of single values.

It is not unreasonable of me to expect to be able to write to a
SET/ARRAY/VARRAY column and read that data back again. I can do this
with the TOAD admin tool and Oracle SQL Developer, so why can't I do it
with the OCI8 extension?

------------------------------------------------------------------------

[2007-01-30 18:53:53] [EMAIL PROTECTED]

>So just because I want to do something with Oracle that I
>can already do with MySQL and PostgreSQL you call me
>obstinate and pedantic?

Oracle does not have SET or ENUM datatypes.
Oracle does not support LIMIT clause.
Oracle does not convert dates to strings and vice versa automatically.
Oracle's SQL dialect is different from the dialects used in MySQL &
PostgreSQL.
There are much more things you CAN do in MySQL and/or Postgres, but
CAN'T do in Oracle.
Do you think they are PHP bugs too?

------------------------------------------------------------------------

[2007-01-30 18:34:41] tony at marston-home dot demon dot co dot uk

So just because I want to do something with Oracle that I can already
do wth MySQL and PostgreSQL you call me obstinate and pedantic? Is it
unreasonable of me to want to read back from the database data which I
have written? I think not.

Your suggestion is impractical for me as it would require a great deal
of effort to build a simple SELECT statement, one where I would have to
step through every column name and process it with oci_define_by_name().
I don't have to do this with LOBs, so why should I have to do it with
collections?

Why is it not possible for the OCI8 extension to detect that a column
is a VARRAY and return it as a collection object which I can then
process with the OCI-Collection methods? It already has this option for
LOB columns. Instead of me doing it in my code why can't the extension
do it automatically instead of failing with error 932?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40186

-- 
Edit this bug report at http://bugs.php.net/?id=40186&edit=1

Reply via email to