Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id DA442476EA3 for ; Thu, 13 Jun 2002 12:32:14 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 7D612476E0F for ; Thu, 13 Jun 2002 12:28:53 -0400 (EDT) Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.11.6/8.11.6) with ESMTP id g5DGURh28809; Thu, 13 Jun 2002 19:30:27 +0300 Date: Thu, 13 Jun 2002 19:30:27 +0300 (EEST) From: Achilleus Mantzios To: joseph@asti.dost.gov.ph Cc: pgsql-sql@postgresql.org Subject: Re: how do i provide array parameters for my functions in php In-Reply-To: <1023983952.3d08c15005fc2@www.asti.dost.gov.ph> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200206/179 X-Sequence-Number: 8144 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