0

I'm working with an oracle database and I need to instantiate an oracle collection in the way that oci-collection would. See: http://php.net/manual/en/function.oci-new-collection.php

However, I am using PDO and I don't see anything in the php docs (http://php.net/manual/en/book.pdo.php) that looks equivalent. Is there a way to use the PDO connection to call the OCI-COLLECTION functionality? Or what other solutions to this might I not be seeing...

I could instantiate an oci_connect but that seems redundant, unnecessary, and potentially wrong...

Jeff
  • 689
  • 1
  • 5
  • 23
  • I looked at the OCI8 documentation, but I couldn't see what collections are used for. – Barmar Nov 14 '16 at 22:24
  • Have a look at this: http://www.oracle.com/technetwork/articles/seliverstov-multirows-098120.html essentially what I'm after is a way to bulk insert to an oracle table rather than running 1 update statement at a time. (I'm inserting upwards to a million records at a time). – Jeff Nov 14 '16 at 22:27
  • There's nothing like it in PDO, because this is very Oracle-specific, and PDO tries to be database-independent. Instead of running 1 update at a time, batch them with multiple values: `INSERT INTO ... VALUES (...), (...), (...), ...` – Barmar Nov 14 '16 at 22:29
  • 1
    Oracle does not accept multiple inserts in 1 statement in the same way that MySQL does :( I am not familiar with the syntax - reviewing this at the moment. perhaps it will answer the question: http://stackoverflow.com/questions/39576/best-way-to-do-multi-row-insert-in-oracle – Jeff Nov 14 '16 at 22:43
  • Yeah, I guess you need to use that method for Oracle. – Barmar Nov 14 '16 at 22:54

0 Answers0