
function with array parameter
--0-2016155230-1163016443=:43259
Content-Type: text/plain; charset=ascii
Content-Transfer-Encoding: quoted-printable
Hello,=0AI have a function that I would like to call from a php script:=0A=
=0ACREATE OR REPLACE FUNCTION a_dummy(arr_in text[])=0A RETURNS text AS=0A=
$BODY$=0Adeclare=0Abegin=0A return arr_in[1];=0Aend;=0A$BODY$=0A LANGUA=
GE 'plpgsql' VOLATILE;=0A=0Aand the php code would be something like that=
=0A$arr;=0A$arr[0] =3D "one";=0A$arr[1] =3D 'two';=0A$query =3D "select fun=
c_a_dummy($arr)";=0A$result =3D pg_query($query);=0Aecho pg_fetch_result($r=
esult, 0, 0);=0A=0A=0Abut the syntax is wrong. Any idea what I should do to=
make it work=0AThank you=0A=0A=0A=0A
--0-2016155230-1163016443=:43259
Content-Type: text/html; charset=ascii
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:times new roman, new york, times, serif;=
font-size:12pt"><div>Hello,<br>I have a function that I would like to call =
from a php script:<br><br>CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])=
<br> RETURNS text AS<br>$BODY$<br>declare<br>begin<br> &nb=
sp; return arr_in[1];<br>end;<br>$BODY$<br> LANGUAGE 'plpgsql' VOLATI=
LE;<br><br>and the php code would be something like that<br>$arr;<br>$arr[0=
] =3D "one";<br>$arr[1] =3D 'two';<br>$query =3D "select func_a_dummy($arr)=
";<br>$result =3D pg_query($query);<br>echo pg_fetch_result($result, 0, 0);=
<br><br><br>but the syntax is wrong. Any idea what I should do to make it w=
ork<br>Thank you<br></div></div><br></body></html>
--0-2016155230-1163016443=:43259--
Re: function with array parameter
------=_Part_27610_9570405.1163017529444
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Jean,
>>$result = pg_query($query);
try it as follows
$result=pg_query($database,$query);
where
$database=<database name>
Regards,
Talha Khan
On 11/9/06, Jean-Christophe Roux <jcxxr [at] yahoo.com> wrote:
>
> Hello,
> I have a function that I would like to call from a php script:
>
> CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])
> RETURNS text AS
> $BODY$
> declare
> begin
> return arr_in[1];
> end;
> $BODY$
> LANGUAGE 'plpgsql' VOLATILE;
>
> and the php code would be something like that
> $arr;
> $arr[0] = "one";
> $arr[1] = 'two';
> $query = "select func_a_dummy($arr)";
> $result = pg_query($query);
> echo pg_fetch_result($result, 0, 0);
>
>
> but the syntax is wrong. Any idea what I should do to make it work
> Thank you
>
>
------=_Part_27610_9570405.1163017529444
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Jean,<br><br>>>$result = pg_query($query);<br><br>try it as follows<br><br>$result=pg_query($database,$query);<br><br>where<br><br>$database=<database name><br><br><div><span class="gmail_quote">Regards,<br>
Talha Khan<br><br>On 11/9/06, <b class="gmail_sendername">Jean-Christophe Roux</b> <jcxxr [at] yahoo.com> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hello,<br>I have a function that I would like to call from a php script:<br><br>CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])<br>
RETURNS text AS<br>$BODY$<br>declare<br>begin<br> return arr_in[1];<br>end;<br>$BODY$<br> LANGUAGE 'plpgsql' VOLATILE;<br><br>and the php code would be something like that<br>$arr;<br>$arr[0] = "one";<br>$arr[1] = 'two';
<br>$query = "select func_a_dummy($arr)";<br>$result = pg_query($query);<br>echo pg_fetch_result($result, 0, 0);<br><br><br>but the syntax is wrong. Any idea what I should do to make it work<br>Thank you<br></div>
</div><br></div>
</blockquote></div><br>
------=_Part_27610_9570405.1163017529444--
Re: function with array parameter
> On 11/9/06, Jean-Christophe Roux <jcxxr [at] yahoo.com> wrote:
> > Hello,
> > I have a function that I would like to call from a php script:
> >
> > CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])
> > RETURNS text AS
> > $BODY$
> > declare
> > begin
> > return arr_in[1];
> > end;
> > $BODY$
> > LANGUAGE 'plpgsql' VOLATILE;
> >
> > and the php code would be something like that
> > $arr;
> > $arr[0] = "one";
> > $arr[1] = 'two';
> > $query = "select func_a_dummy($arr)";
> > $result = pg_query($query);
> > echo pg_fetch_result($result, 0, 0);
A PHP array doesn't translate to a PostgreSQL array. You have to build up a
string to pass to the function ( ie. '{"value1","value2"}' ) .
--
"Emacs is great. But hang onto vim, because you'll still need a decent
text editor." - seen on /.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: function with array parameter
--0-1675484758-1163021422=:62120
Content-Type: text/plain; charset=ascii
Content-Transfer-Encoding: quoted-printable
Hello,=0A=0AThanks for the answer but the resource connection is optional a=
nd in this script there is no ambiguity since there is only one connection.=
I added the connection to pg_query any way and the script still fails. I w=
ent through archives and saw that others had the same problem with using a =
PHP arrays as a parameter to a Postgresql function. I have not found a solu=
tion though; any thought?=0A=0A----- Original Message ----=0AFrom: Talha Kh=
an <talha.amjad [at] gmail.com>=0ATo: Jean-Christophe Roux <jcxxr [at] yahoo.com>=0AC=
c: pgsql-php [at] postgresql.org=0ASent: Wednesday, November 8, 2006 3:25:29 PM=
=0ASubject: Re: [PHP] function with array parameter=0A=0AHi Jean,=0A=0A>>$r=
esult =3D pg_query($query);=0A=0Atry it as follows=0A=0A$result=3Dpg_query(=
$database,$query);=0A=0Awhere=0A=0A$database=3D<database name>=0A=0ARegards=
,=0A=0ATalha Khan=0A=0AOn 11/9/06, Jean-Christophe Roux <jcxxr [at] yahoo.com> w=
rote:=0AHello,=0AI have a function that I would like to call from a php scr=
ipt:=0A=0ACREATE OR REPLACE FUNCTION a_dummy(arr_in text[])=0A=0A RETURNS =
text AS=0A$BODY$=0Adeclare=0Abegin=0A return arr_in[1];=0Aend;=0A$BODY$=
=0A LANGUAGE 'plpgsql' VOLATILE;=0A=0Aand the php code would be something =
like that=0A$arr;=0A$arr[0] =3D "one";=0A$arr[1] =3D 'two';=0A=0A$query =3D=
"select func_a_dummy($arr)";=0A$result =3D pg_query($query);=0Aecho pg_fet=
ch_result($result, 0, 0);=0A=0A=0Abut the syntax is wrong. Any idea what I =
should do to make it work=0AThank you=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=
=0A=0A=0A
--0-1675484758-1163021422=:62120
Content-Type: text/html; charset=ascii
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:times new roman, new york, times, serif;=
font-size:12pt"><div style=3D"font-family: times new roman,new york,times,s=
erif; font-size: 12pt;">Hello,<br><br>Thanks for the answer but the resourc=
e connection is optional and in this script there is no ambiguity since the=
re is only one connection. I added the connection to pg_query any way and t=
he script still fails. I went through archives and saw that others had the =
same problem with using a PHP arrays as a parameter to a Postgresql functio=
n. I have not found a solution though; any thought?<br><br><div style=3D"fo=
nt-family: times new roman,new york,times,serif; font-size: 12pt;">----- Or=
iginal Message ----<br>From: Talha Khan <talha.amjad [at] gmail.com><br>To=
: Jean-Christophe Roux <jcxxr [at] yahoo.com><br>Cc: pgsql-php [at] postgresql.=
org<br>Sent: Wednesday, November 8, 2006 3:25:29 PM<br>Subject: Re: [PHP] f=
unction with array
parameter<br><br>Hi Jean,<br><br>>>$result =3D pg_query($query);<br>=
<br>try it as follows<br><br>$result=3Dpg_query($database,$query);<br><br>w=
here<br><br>$database=3D<database name><br><br><div><span class=3D"gm=
ail_quote">Regards,<br>=0ATalha Khan<br><br>On 11/9/06, <b class=3D"gmail_s=
endername">Jean-Christophe Roux</b> <<a rel=3D"nofollow" target=3D"_blan=
k" href=3D"mailto:jcxxr [at] yahoo.com">jcxxr [at] yahoo.com</a>> wrote:</span><bl=
ockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204=
, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">=0A<div><div style=
=3D"font-family: times new roman,new york,times,serif; font-size: 12pt;"><d=
iv>Hello,<br>I have a function that I would like to call from a php script:=
<br><br>CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])<br>=0A RETU=
RNS text AS<br>$BODY$<br>declare<br>begin<br> return arr_=
in[1];<br>end;<br>$BODY$<br> LANGUAGE 'plpgsql' VOLATILE;<br><br>and =
the php code would be something like that<br>$arr;<br>$arr[0] =3D "one";<br=
>$arr[1] =3D 'two';=0A<br>$query =3D "select func_a_dummy($arr)";<br>$resul=
t =3D pg_query($query);<br>echo pg_fetch_result($result, 0, 0);<br><br><br>=
but the syntax is wrong. Any idea what I should do to make it work<br>Thank=
you<br></div>=0A</div><br></div>=0A</blockquote></div><br>=0A</div><br></d=
iv></div><br></body></html>
--0-1675484758-1163021422=:62120--
Re: function with array parameter
You could do something like:
(where $source_array is your array to pass to the PGSQL function):
<?php
// start off the query string
$query = "select func_a_dummy(";
// for each element of the array add to the string
foreach ($source_array AS $func_parameter)
{
$query .= "\"" . $func_parameter . "\", ";
}
// we'll end up with a trailing ", " on the end of the string due to the
final parameter, so remove it
$query = substring($query, 0, strlen($query) - 2);
// and close of the query string
$query .= ");";
?>
Then send $query to the database. That will create you something like
(if $source_array contains "param1" and "param2"):
select func_a_dummy("param1", "param2");
Regards,
Andy.
Jean-Christophe Roux wrote:
> Hello,
>
> Thanks for the answer but the resource connection is optional and in
> this script there is no ambiguity since there is only one connection.
> I added the connection to pg_query any way and the script still fails.
> I went through archives and saw that others had the same problem with
> using a PHP arrays as a parameter to a Postgresql function. I have not
> found a solution though; any thought?
>
> ----- Original Message ----
> From: Talha Khan <talha.amjad [at] gmail.com>
> To: Jean-Christophe Roux <jcxxr [at] yahoo.com>
> Cc: pgsql-php [at] postgresql.org
> Sent: Wednesday, November 8, 2006 3:25:29 PM
> Subject: Re: [PHP] function with array parameter
>
> Hi Jean,
>
> >>$result = pg_query($query);
>
> try it as follows
>
> $result=pg_query($database,$query);
>
> where
>
> $database=<database name>
>
> Regards,
> Talha Khan
>
> On 11/9/06, *Jean-Christophe Roux* <jcxxr [at] yahoo.com
> <mailto:jcxxr [at] yahoo.com>> wrote:
>
> Hello,
> I have a function that I would like to call from a php script:
>
> CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])
> RETURNS text AS
> $BODY$
> declare
> begin
> return arr_in[1];
> end;
> $BODY$
> LANGUAGE 'plpgsql' VOLATILE;
>
> and the php code would be something like that
> $arr;
> $arr[0] = "one";
> $arr[1] = 'two';
> $query = "select func_a_dummy($arr)";
> $result = pg_query($query);
> echo pg_fetch_result($result, 0, 0);
>
>
> but the syntax is wrong. Any idea what I should do to make it work
> Thank you
>
>
>
>
> !DSPAM:37,45524c9640412067911618!
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: function with array parameter
--0-363435347-1163022736=:35585
Content-Type: text/plain; charset=ascii
Content-Transfer-Encoding: quoted-printable
Hello,=0A=0ALooks like it is best to forget about passing an array directly=
between php and postgresql and instead rely on some string.=0A=0Athanks to=
all=0A=0A=0A----- Original Message ----=0AFrom: Andy Shellam (Mailing List=
s) <andy.shellam-lists [at] mailnetwork.co.uk>=0ATo: Jean-Christophe Roux <jcxxr=
[at] yahoo.com>; pgsql-php [at] postgresql.org=0ASent: Wednesday, November 8, 2006 4=
:37:22 PM=0ASubject: Re: [PHP] function with array parameter=0A=0AYou could=
do something like:=0A=0A(where $source_array is your array to pass to the =
PGSQL function):=0A=0A<?php=0A// start off the query string=0A$query =3D "s=
elect func_a_dummy(";=0A=0A// for each element of the array add to the stri=
ng=0Aforeach ($source_array AS $func_parameter)=0A{=0A $query .=3D "\"" =
.. $func_parameter . "\", ";=0A}=0A=0A// we'll end up with a trailing ", " o=
n the end of the string due to the =0Afinal parameter, so remove it=0A$quer=
y =3D substring($query, 0, strlen($query) - 2);=0A=0A// and close of the qu=
ery string=0A$query .=3D ");";=0A?>=0A=0AThen send $query to the database. =
That will create you something like =0A(if $source_array contains "param1"=
and "param2"):=0A=0Aselect func_a_dummy("param1", "param2");=0A=0ARegards,=
=0A=0AAndy.=0A=0AJean-Christophe Roux wrote:=0A> Hello,=0A>=0A> Thanks for =
the answer but the resource connection is optional and in =0A> this script =
there is no ambiguity since there is only one connection. =0A> I added the =
connection to pg_query any way and the script still fails. =0A> I went thro=
ugh archives and saw that others had the same problem with =0A> using a PHP=
arrays as a parameter to a Postgresql function. I have not =0A> found a so=
lution though; any thought?=0A>=0A> ----- Original Message ----=0A> From: T=
alha Khan <talha.amjad [at] gmail.com>=0A> To: Jean-Christophe Roux <jcxxr [at] yahoo=
..com>=0A> Cc: pgsql-php [at] postgresql.org=0A> Sent: Wednesday, November 8, 200=
6 3:25:29 PM=0A> Subject: Re: [PHP] function with array parameter=0A>=0A> H=
i Jean,=0A>=0A> >>$result =3D pg_query($query);=0A>=0A> try it as follows=
=0A>=0A> $result=3Dpg_query($database,$query);=0A>=0A> where=0A>=0A> $datab=
ase=3D<database name>=0A>=0A> Regards,=0A> Talha Khan=0A>=0A> On 11/9/06, *=
Jean-Christophe Roux* <jcxxr [at] yahoo.com =0A> <mailto:jcxxr [at] yahoo.com>> wrote=
:=0A>=0A> Hello,=0A> I have a function that I would like to call fr=
om a php script:=0A>=0A> CREATE OR REPLACE FUNCTION a_dummy(arr_in text=
[])=0A> RETURNS text AS=0A> $BODY$=0A> declare=0A> begin=
=0A> return arr_in[1];=0A> end;=0A> $BODY$=0A> LANGUA=
GE 'plpgsql' VOLATILE;=0A>=0A> and the php code would be something like=
that=0A> $arr;=0A> $arr[0] =3D "one";=0A> $arr[1] =3D 'two';=
=0A> $query =3D "select func_a_dummy($arr)";=0A> $result =3D pg_que=
ry($query);=0A> echo pg_fetch_result($result, 0, 0);=0A>=0A>=0A> bu=
t the syntax is wrong. Any idea what I should do to make it work=0A> Th=
ank you=0A>=0A>=0A>=0A>=0A> !DSPAM:37,45524c9640412067911618! =0A=0A=0A----=
-----------------------(end of broadcast)---------------------------=0ATIP =
2: Don't 'kill -9' the postmaster=0A=0A=0A=0A=0A=0A=0A
--0-363435347-1163022736=:35585
Content-Type: text/html; charset=ascii
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:times new roman, new york, times, serif;=
font-size:12pt"><div style=3D"font-family: times new roman,new york,times,s=
erif; font-size: 12pt;">Hello,<br><br>Looks like it is best to forget about=
passing an array directly between php and postgresql and instead rely on s=
ome string.<br><br>thanks to all<br><br><br><div style=3D"font-family: time=
s new roman,new york,times,serif; font-size: 12pt;">----- Original Message =
----<br>From: Andy Shellam (Mailing Lists) <andy.shellam-lists [at] mailnetwo=
rk.co.uk><br>To: Jean-Christophe Roux <jcxxr [at] yahoo.com>; pgsql-php=
[at] postgresql.org<br>Sent: Wednesday, November 8, 2006 4:37:22 PM<br>Subject:=
Re: [PHP] function with array parameter<br><br><div>You could do something=
like:<br><br>(where $source_array is your array to pass to the PGSQL funct=
ion):<br><br><?php<br>// start off the query string<br>$query =3D "selec=
t
func_a_dummy(";<br><br>// for each element of the array add to the string<=
br>foreach ($source_array AS $func_parameter)<br>{<br> &nb=
sp;$query .=3D "\"" . $func_parameter . "\", ";<br>}<br><br>// we'll end up=
with a trailing ", " on the end of the string due to the <br>final paramet=
er, so remove it<br>$query =3D substring($query, 0, strlen($query) - 2);<br=
><br>// and close of the query string<br>$query .=3D ");";<br>?><br><br>=
Then send $query to the database. That will create you something=
like <br>(if $source_array contains "param1" and "param2"):<br><br>select =
func_a_dummy("param1", "param2");<br><br>Regards,<br><br>Andy.<br><br>Jean-=
Christophe Roux wrote:<br>> Hello,<br>><br>> Thanks for the answer=
but the resource connection is optional and in <br>> this script there =
is no ambiguity since there is only one connection. <br>> I added the co=
nnection to pg_query any way and the script still fails. <br>> I went th=
rough archives and
saw that others had the same problem with <br>> using a PHP arrays as a=
parameter to a Postgresql function. I have not <br>> found a solution t=
hough; any thought?<br>><br>> ----- Original Message ----<br>> Fro=
m: Talha Khan <talha.amjad [at] gmail.com><br>> To: Jean-Christophe Rou=
x <jcxxr [at] yahoo.com><br>> Cc: pgsql-php [at] postgresql.org<br>> Sent=
: Wednesday, November 8, 2006 3:25:29 PM<br>> Subject: Re: [PHP] functio=
n with array parameter<br>><br>> Hi Jean,<br>><br>> >>$re=
sult =3D pg_query($query);<br>><br>> try it as follows<br>><br>>=
; $result=3Dpg_query($database,$query);<br>><br>> where<br>><br>&g=
t; $database=3D<database name><br>><br>> Regards,<br>> Talha=
Khan<br>><br>> On 11/9/06, *Jean-Christophe Roux* <jcxxr [at] yahoo.co=
m <br>> <mailto:jcxxr [at] yahoo.com>> wrote:<br>><br>> &=
nbsp; Hello,<br>> I have a function =
that I would like
to call from a php script:<br>><br>> CREATE =
OR REPLACE FUNCTION a_dummy(arr_in text[])<br>> &=
nbsp; RETURNS text AS<br>> $BODY$<br>>&=
nbsp; declare<br>> begin<br>&g=
t; return arr_in[1];<br>>=
; end;<br>> $BODY$<br>&g=
t; LANGUAGE 'plpgsql' VOLATILE;<br>>=
<br>> and the php code would be something like t=
hat<br>> $arr;<br>> $=
arr[0] =3D "one";<br>> $arr[1] =3D 'two';<br>>=
; $query =3D "select func_a_dummy($arr)";<br>>&n=
bsp; $result =3D pg_query($query);<br>> &nb=
sp; echo pg_fetch_result($result, 0, 0);<br>><br>><br>> =
;
but the syntax is wrong. Any idea what I should do to make it work<br>>=
Thank you<br>><br>><br>><br>><br>> =
!DSPAM:37,45524c9640412067911618! <br><br><br>---------------------------(e=
nd of broadcast)---------------------------<br>TIP 2: Don't 'kill -9' the p=
ostmaster<br></div></div><br></div></div><br></body></html>
--0-363435347-1163022736=:35585--
Re: function with array parameter
Yes - PHP arrays will inevitably be different to PostgreSQL arrays.
Jean-Christophe Roux wrote:
> Hello,
>
> Looks like it is best to forget about passing an array directly
> between php and postgresql and instead rely on some string.
>
> thanks to all
>
>
> ----- Original Message ----
> From: Andy Shellam (Mailing Lists) <andy.shellam-lists [at] mailnetwork.co.uk>
> To: Jean-Christophe Roux <jcxxr [at] yahoo.com>; pgsql-php [at] postgresql.org
> Sent: Wednesday, November 8, 2006 4:37:22 PM
> Subject: Re: [PHP] function with array parameter
>
> You could do something like:
>
> (where $source_array is your array to pass to the PGSQL function):
>
> <?php
> // start off the query string
> $query = "select func_a_dummy(";
>
> // for each element of the array add to the string
> foreach ($source_array AS $func_parameter)
> {
> $query .= "\"" . $func_parameter . "\", ";
> }
>
> // we'll end up with a trailing ", " on the end of the string due to the
> final parameter, so remove it
> $query = substring($query, 0, strlen($query) - 2);
>
> // and close of the query string
> $query .= ");";
> ?>
>
> Then send $query to the database. That will create you something like
> (if $source_array contains "param1" and "param2"):
>
> select func_a_dummy("param1", "param2");
>
> Regards,
>
> Andy.
>
> Jean-Christophe Roux wrote:
> > Hello,
> >
> > Thanks for the answer but the resource connection is optional and in
> > this script there is no ambiguity since there is only one connection.
> > I added the connection to pg_query any way and the script still fails.
> > I went through archives and saw that others had the same problem with
> > using a PHP arrays as a parameter to a Postgresql function. I have not
> > found a solution though; any thought?
> >
> > ----- Original Message ----
> > From: Talha Khan <talha.amjad [at] gmail.com>
> > To: Jean-Christophe Roux <jcxxr [at] yahoo.com>
> > Cc: pgsql-php [at] postgresql.org
> > Sent: Wednesday, November 8, 2006 3:25:29 PM
> > Subject: Re: [PHP] function with array parameter
> >
> > Hi Jean,
> >
> > >>$result = pg_query($query);
> >
> > try it as follows
> >
> > $result=pg_query($database,$query);
> >
> > where
> >
> > $database=<database name>
> >
> > Regards,
> > Talha Khan
> >
> > On 11/9/06, *Jean-Christophe Roux* <jcxxr [at] yahoo.com
> > <mailto:jcxxr [at] yahoo.com>> wrote:
> >
> > Hello,
> > I have a function that I would like to call from a php script:
> >
> > CREATE OR REPLACE FUNCTION a_dummy(arr_in text[])
> > RETURNS text AS
> > $BODY$
> > declare
> > begin
> > return arr_in[1];
> > end;
> > $BODY$
> > LANGUAGE 'plpgsql' VOLATILE;
> >
> > and the php code would be something like that
> > $arr;
> > $arr[0] = "one";
> > $arr[1] = 'two';
> > $query = "select func_a_dummy($arr)";
> > $result = pg_query($query);
> > echo pg_fetch_result($result, 0, 0);
> >
> >
> > but the syntax is wrong. Any idea what I should do to make it work
> > Thank you
> >
> >
> >
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>
> !DSPAM:37,455251b340411983042122!
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster