Re: No resultset with ocibindbyname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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);

Chris

--
Christopher Jones, Oracle
Email: christopher.jones@xxxxxxxxxx    Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/   Free PHP Book: http://tinyurl.com/f8jad

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux