problem with round() in php script

From: Robert Buckley <robertdbuckley(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: problem with round() in php script
Date: 2011-10-06 07:59:00
Message-ID: 1317887940.80299.YahooMailNeo@web24108.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2011-10-06 08:00:17 Re: function "XXX" already exists with same argument types
Previous Message Albe Laurenz 2011-10-06 07:48:11 Re: Problem dbi_link with postgresql 9.04