RE: [PHP] & vars and ocibindbyname
| From: | Ford, Mike [LSS] | Date: | Wed, 12 Jun 2002 17:23:34 +0000 |
| Subject: | RE: [PHP] & vars and ocibindbyname | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101772@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Laurent Drouet
To: php-general@lists.php.net
I use Php 4.0.6 with oci and when I try to use OcibindByname php
function
I receive the following warning :
Warning: Call-time pass-by-reference has been deprecated .....
The problem is that this function requires the use of &vars
--------------------------
Er -- no it doesn't. I have loads of OCIBindByName calls that have never seen so much as a
sniff of an &. The function definition at http://www.php.net/manual/en/function.ocibindbyname.php:
int OCIBindByName ( int stmt, string ph_name, mixed & variable, int length [, int type])
tells you that the function itself forces the 3rd parameter to be passed by reference, not that it
has to be passed by reference in the call. The following call is perfectly valid and does the job
correctly:
OCIBindByName($stmt, ':NAME', $name, 255);
Cheers!
Mike