calling a stored postgres function from php

Posted by KittyYoung on Stack Overflow See other posts from Stack Overflow or by KittyYoung
Published on 2010-03-29T08:55:48Z Indexed on 2010/03/29 9:03 UTC
Read the original article Hit count: 277

Filed under:
|
|

Just a little confused here...

I have a function in postgres, and when I'm at the pg prompt, I just do:

SELECT zp('zc',10,20,90);
FETCH ALL FROM zc;

I'm wondering how to do this from php?

I thought I could just do:

$q = pg_query("SELECT zp('zc',10,20,90)");

But, how do I "fetch" from that query?

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about php