Search Postgresql Archives

Re: problem with round() in php script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/10/2011 10:02, Robert Buckley wrote:
> Im not quite sure what you are referring to....this 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,round(ges_kw,0)
> FROM energie.tennet_auswertung_2010
>  ');

What I was suggesting was that you try it this way:

   $connection = pg_connect(....
   $result = pg_query($connection, 'select.....

IOW, you pass $connection as the first argument to pg_query(). See the
PHP docs here:

  http://ie.php.net/manual/en/function.pg-query.php

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux