Re: question about OCIBindByName(add some comment)
| From: | Thies C. Arntzen | Date: | Tue, 22 May 2001 15:39:03 +0000 |
| Subject: | Re: question about OCIBindByName(add some comment) | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9531@lists.php.net to get a copy of this message | ||
On Tue, May 22, 2001 at 09:41:25AM +0900, Michael Cheung wrote:
>
> On Mon, 21 May 2001 16:39:05 +0200
> "Thies C. Arntzen" <thies@thieso.net> wrote:
>
> > On Mon, May 21, 2001 at 11:35:36PM +0900, Michael Cheung wrote:
> > > Hi;
> > > Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface.
> > >
> > > I use the following lines to get a result from database;
> > > But It give me result 0, it is incorrect;
> > >
> > > $sql="Select count(*) From member where email=:email";
> > > $sth=OCIParse($dbh,$sql);
> > > OCIBindByName($sth,"email",$email,64);
> > > // with or without ':' is same, and use reference or not is also same here.
> > > OCIExecute($sth);
> > > OCIFetchInto($sth,$data);
> >
> > have you set $email in your script (before OCIExecute)?
>
> I have set the $email before OCIParse().
>
> Is there any problem about the varchar2 data type in bind operation?
it works for me - could you send me a _short_ but complete
testcase that reproduces your problem?
tc