Skip site navigation (1) Skip section navigation (2)

Re: PDO, postgre and PHP data types

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: PDO, postgre and PHP data types
Date: 2009-05-26 11:57:40
Message-ID: gvglfk$8vs$5@reversiblemaps.ath.cx (view raw or flat)
Thread:
Lists: pgsql-php
On 2009-05-25, Developer <dev002(at)pas-world(dot)com> wrote:
> Hello,
> I have some problem with data type of PDO returned instance, array of
> integer (_int4[]) is returned as string.

yes.

> I read ref.pgsql.php, but nothing said how solve this problem.

> I use something like this for it:
> $dat=array($k=>explode(',',trim($v,'{}'))); // One dimension array
> But it is very slow. Any method to return correct data types from
> DATABASE to PHP parsed with high speed code (like C)?

php will never be "fast like c"

if you are not using the arrays with postgres stored procedures,
perhaps you could store them in a format that PHP is handles better
(eg: serialize)


In response to

pgsql-php by date

Next:From: Carol WalterDate: 2009-07-01 17:52:49
Subject: Begin block
Previous:From: ChrisDate: 2009-05-25 23:13:47
Subject: Re: PDO, postgre and PHP data types

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group