Re: Re: OCI extension - OCIQuery() ?
| From: | Thies C. Arntzen | Date: | Thu, 17 Oct 2002 12:02:00 +0000 |
| Subject: | Re: Re: OCI extension - OCIQuery() ? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89640@lists.php.net to get a copy of this message | ||
On Thu, Oct 17, 2002 at 01:36:26PM +0200, Maxim Maletsky wrote:
>
> "Thies C. Arntzen" <thies@thiesos.org> wrote... :
>
> > > Hope to see someone to anser, commenting my thoughts on this. I am very
> > > much willing contributing to the PHP's Oracle support development.
> >
> > that always appreciated. wher do you want to start?
> > tc
>
>
> Thies, what do you thik of adding an OCIQuery function?
>
> e.g:
>
> <?php
>
> $query = "SELECT to_char(sysdate) FROM dual";
>
> // this:
> $stmt = OCIParse($conn, $query);
> $result = OCIExecute($stmt, OCI_DEFAULT);
>
>
> // can be this:
> $result = OCIQuery($conn, $query, OCI_DEFAULT);
>
> ?>
>
> It could be a nice shortcut for those who use this combo always together
> and, plus, it would be a very elementary thing to implement.
>
> What do you think of it?
>
> I could start from this one, to warm up :) It's been I while I thought
> OCIQuery() could have been implemented.
i don't really think it's a needed function as it won't
support binding of variables and setting the execute mode.
also writing:
$s = ociparse($d, "..."); ociexecute($s);
is "short enough" for most things.
also, cause you "loose" the statement handle you cannot reuse
it. so adding ociquery will make things less optimal.
re,
tc