[PHP-DB] Using a PostgreSQL refcursor.

2009-06-17 Thread Hartman, Matthew
Good morning. Is there a way to use a returned refcursor from PostgreSQL using PDO? I have scoured the web and have yet to find a good result. Here's a few things I've tried. This example simply does not work. - $database = Database::load(); // Returns a singleton object with PDO connected to

RE: [PHP-DB] currval of an index in Postgres to pass on?

2009-06-09 Thread Hartman, Matthew
Check this link. http://ca3.php.net/function.pg-query The second example shows one way to perform a transaction, or the first commit shows another potential way (sending a "BEGIN;" as it's own query"). An easier way than using CURRVAL is to use the "RETURNING" clause on your first INSERT, and th

[PHP-DB] Multiple result sets using PDO and PostgreSQL.

2009-06-04 Thread Hartman, Matthew
Is it possible? I have created a function to return "setof refcursor" and it executes correctly, but PDO fails when I call nextRowset. If anyone has an answer and wants StackOveflow points, I posted this here (with more details too). http://stackoverflow.com/questions/951628/can-you-return-mult