Re: [GENERAL] problem with round() in php script

2011-10-06 Thread Raymond O'Donnell
On 06/10/2011 10:02, Robert Buckley wrote: > Im not quite sure what you are referring tothis is my php code. The > connection is included, but not in the sql query! > > > $connection=pg_connect("host=*** port=*** dbname=zgb user=*** > password=***"); > > $result = pg_query(' > SELECT name,r

Re: [GENERAL] problem with round() in php script

2011-10-06 Thread Robert Buckley
11 Betreff: Re: [GENERAL] problem with round() in php script 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

Re: [GENERAL] problem with round() in php script

2011-10-06 Thread Raymond O'Donnell
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_

[GENERAL] problem with round() in php script

2011-10-06 Thread Robert Buckley
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