pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how do i provide array parameters for my functions in php
2+ messages / 2 participants
[nested] [flat]

* how do i provide array parameters for my functions in php
@ 2002-06-13 15:59 joseph@asti.dost.gov.ph
  2002-06-13 16:30 ` Re: how do i provide array parameters for my functions in php Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 2+ messages in thread

From: joseph@asti.dost.gov.ph @ 2002-06-13 15:59 UTC (permalink / raw)
  To: pgsql-sql

i have just finished creating a function that has an array of integers as its 
parameter.  what i would like to know is how do i declare/execute my function 
in php.  i tried several syntax
e.g.
$arrvalue - an array of integers

$strquery = "select functionname($arrvalue)";
$strquery = "select functionname($arrvalue[])";

what is the right syntax 
TIA
joseph



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: how do i provide array parameters for my functions in php
  2002-06-13 15:59 how do i provide array parameters for my functions in php joseph@asti.dost.gov.ph
@ 2002-06-13 16:30 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Achilleus Mantzios @ 2002-06-13 16:30 UTC (permalink / raw)
  To: joseph@asti.dost.gov.ph; +Cc: pgsql-sql

On Thu, 13 Jun 2002 joseph@asti.dost.gov.ph wrote:

> i have just finished creating a function that has an array of integers as its 
> parameter.  what i would like to know is how do i declare/execute my function 
> in php.  i tried several syntax
> e.g.
> $arrvalue - an array of integers
> 
> $strquery = "select functionname($arrvalue)";
> $strquery = "select functionname($arrvalue[])";

If you wanna do a select i think is safe to construct the select statement
as a string (including your arrays).
E.g.
$strquery = "select func('{1,2,3,4}')";

Now if your function outputs an array, thats a little bit more complicated
lies in the php field and you need to ask pgsql-php or something like 
that.

> 
> what is the right syntax 
> TIA
> joseph
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-06-13 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-13 15:59 how do i provide array parameters for my functions in php joseph@asti.dost.gov.ph
2002-06-13 16:30 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox