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!).

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.

Cheers!

Mike

----------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Beckett Park
Tel: extn 4730        Fax: extn 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to