Re: problem with round() in php script

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Robert Buckley <robertdbuckley(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: problem with round() in php script
Date: 2011-10-06 08:42:44
Message-ID: 4E8D6A04.8020202@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/10/2011 08:59, Robert Buckley wrote:
> hi,
>
> In pgadmin3 this query works ok.
>
> SELECT name,round(ges_kw,0)
> FROM energie.tennet_auswertung_2010;
>
> but in php 5.3.2 the result is 0 for all rows
>
> $result = pg_query('
> SELECT name,round(ges_kw,0)
> FROM energie.tennet_auswertung_2010
> ');

The first parameter in pg_query() is supposed to be the connection
returned by pg_connect() - the docs say that it can be omitted, but
that's not recommended. Have you tried it with the connection included?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Buckley 2011-10-06 09:02:28 Re: problem with round() in php script
Previous Message depstein 2011-10-06 08:12:28 Re: gaps/overlaps in a time table : current and previous row question