On Wed, May 01, 2002 at 12:35:48PM +0100, Ford, Mike [LSS] wrote:
> Using the Oracle OCI interface, as far as I can see if I do the following:
>
> $stmt = OCIParse($conn, 'DELETE FROM TITLES'
> . ' WHERE TAG<0'
> . ' RETURNING ID INTO :T_ID');
>
> there seems to be no way of picking up more than one ID when multiple rows are
>deleted. The obvious
>
> OCIBindByName($stmt, ':T_ID', $t_id, 10);
>
> only returns one ID, and not an array of IDs as I might have
> expected. No other method I can think of is able to return
> even that! (Including any OCIFetch variation, which doesn't
> surprise me as they're labelled as being for SELECT results
> only!)
>
> I would be very grateful for any suggestions of how to do this,
> or confirmation that it can't be done (in which case I'll
> submit a Feature/Change request to ask for it!).
have you tried an array bind? i have not tries myself, but
that would be my 1st guess.
see http://conf.php.net/pres/slides/oci/paper.txt for a small
sample.
>
> It seems ridiculous that I should have to do a SELECT/DELETE
> pair, when Oracle provides such a useful feature to get the
> same result in a single statement.
bla bla bla...
php comes for free - please choose your words a bit more
careful, ppls might get offended and not respond to you at
all!
if you require this feature and it's not in PHP you can:
- moan
- implement it and keep it private
- implement it and give it back to PHP for other ppls to use
- find someone who implements it for free
- sponsor someone to implement it
if you are interested in sponsoring this development please
contact me via PM.
tc
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php