Re: Database connection

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jill(dot)jensen(at)aisn(dot)net
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Database connection
Date: 2003-01-29 07:02:10
Message-ID: 20400.1043823730@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Jill Jensen" <jill(dot)jensen(at)aisn(dot)net> writes:
> $host = "localhost";
> $user = "srproject";
> $pass = "56364563";
> $db = "srproject";

> //open a connection to the database server
> $connection = pg_connect ("host=$local host dbname=$srproject
> user=$srproject password=$56364563");

This is surely wrong.

> $connection = pg_connect ("host=$host dbname=$dbuser=$user password=$pass");

This looks reasonable except you need another space:

$connection = pg_connect ("host=$host dbname=$db user=$user password=$pass");

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message eurlix 2003-01-29 09:46:56 DB corrupted ?
Previous Message Derek Clarkson 2003-01-29 06:03:23 Silly Question about varchar(n)