| От | rob stone |
|---|---|
| Тема | Re: cursor "x" does not exist |
| Дата | |
| Msg-id | 1523794523.3515.6.camel@gmail.com обсуждение исходный текст |
| Ответ на | cursor "x" does not exist (Bob Jones <r.a.n.d.o.m.d.e.v.4+postgres@gmail.com>) |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера