View Single Post

   
  #5 (permalink)  
Old 04-09-2008, 11:18 PM
brian
 
Posts: n/a
Default Re: PHP and Postgres arrays

Hannes Dorbath wrote:
> Yannick Warnier wrote:
>> I thought about it, but it's not very portable if you want to ship a PHP
>> application. But I admit I will fall back to that solution if I cannot
>> find any other (considering PostgreSQL might be the only open-source
>> database to offer in-fields arrays anyway).

>
> You can use the build in function array_to_string:
> http://www.postgresql.org/docs/8.3/s...ons-array.html
>


Then use implode(YOUR_DELIMITER, YOUR_STRING) to get an array.

Another solution would be to use the MDB2 (or similar) PEAR wrapper.

b

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote