Re: Connection problem

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






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





[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux