Skip site navigation (1) Skip section navigation (2)

Re: Connection problem

From: Ewald Geschwinde <postgres(at)cybertec(dot)at>
To: Laukó Péter <plauko(at)freemail(dot)hu>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Connection problem
Date: 2001-12-04 14:54:00
Message-ID: 3C0CE388.40306@cybertec.at (view raw or flat)
Thread:
Lists: pgsql-php
>
>
>
>The code is:
><?
>
>class DBConnection
>{
>    var $con_string;
>
>    function DBConnection()
>    {
>        $con_string = "dbname=hajnalcsillag user=lao password=abc123 host=localhost port=5432";
>        $ret = pg_connect( $this->con_string );
>    }
>}
>
>?>
>

it's better to do it so
$this>con_string="dbname.....";
otherwise you run into big trouble
cause
$this->con_string =>GLOBAL
$con_string=>local

PHP is nto so stble with such declarations
(real-tie experience)
Ewald




In response to

pgsql-php by date

Next:From: Marius AndreianaDate: 2001-12-10 09:27:56
Subject: How to manage search results?
Previous:From: Stephan SzaboDate: 2001-12-03 19:07:19
Subject: Re: persistent connections, AOLserver (Was: maybe Offtopic :

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group