Roberto Mansfield wrote:

>> PID            NOT NULL        CHAR(8)

> I believe the problem has to do with your field type for PID. When you run:
>   select * FROM  projekte_generisch where pid='u0test'
> Oracle either autotrims or autopads (I'm not sure which) so that
> 'u0test' matches PID even though PID has a fixed 8-character length. But
> when you use bind variables, this doesn't happen. So you'll need to use:

Hi Roberto,

Well spotted!

I can see a minor inconsistency between oci_bind_array_by_name() and
the much older oci_bind_by_name() call.  You can pass SQLT_AFC (i.e
the CHAR type) to the former but not the latter.

If anyone volunteers to write some test cases I can merge a patch to
OCI8 to allow:

    oci_bind_by_name($s, ':bv', $bv, -1, SQLT_AFC);


Christopher Jones, Oracle
Email: [EMAIL PROTECTED]    Tel:  +1 650 506 8630
Blog:   Free PHP Book:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to