problem with round() in php script - Mailing list pgsql-general

From Robert Buckley
Subject problem with round() in php script
Date
Msg-id 1317887940.80299.YahooMailNeo@web24108.mail.ird.yahoo.com
Whole thread Raw
Responses Re: problem with round() in php script  (Raymond O'Donnell <rod@iol.ie>)
List pgsql-general
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
');


What should I do to round up to 0 decimal places?

yours with thanks,

Rob



pgsql-general by date:

Previous
From: Frank Lanitz
Date:
Subject: Postgres 8.4: archive_timeout vs. checkpoint_timeout
Next
From: "Albe Laurenz"
Date:
Subject: Re: function "XXX" already exists with same argument types