Search Postgresql Archives

Re: cursor "x" does not exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bob,

On Sat, 2018-04-14 at 15:44 +0100, Bob Jones wrote:
> Hello,
> 
> 
> 
> P.S. As a side-question, if anyone here has experience in using
> Postgres as a backend to PHP, are refcursors the way to go or should
> I
> be thinking of SETOF or other return styles ?
> 


If you have a business requirement along the lines of "display all
outstanding orders for a customer" it is best to create a view that
serves that purpose. Then all you need to code is a "select * from
v_outstanding_orders where customer_id = $1";
If there are any outstanding orders you can page through the
associative array returned by the query in order to display the
results.

HTH,
Rob






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux