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