Re: foreach OCIBindByName()
| From: | Thies C. Arntzen | Date: | Wed, 14 Feb 2001 17:55:00 +0000 |
| Subject: | Re: foreach OCIBindByName() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39692@lists.php.net to get a copy of this message | ||
On Wed, Feb 14, 2001 at 12:35:10PM +0000, Butler, Shaun wrote:
>
> So I want to bind multiple values that are in an associative array
>
> I have this code
>
>
> foreach ($binds as $key=>$value)
> {
> OCIBindByName($this->m_cursor,":$key",$value,-1);
> }
>
> but it only seems to work for one value in the array, the array conetents
> would be something like
>
> $binds["id"] = 54;
> $binds["name"] = Dick;
>
> anyone get this to work or have any idea why it works when the array only has
> one thing in it? Thanks in advance
the values bound by ocibindbyname are "taken" from
script-space when you call ociexecute() and then $value will
have only one value.
tc