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
r...@iol.ie

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

Reply via email to