Re: Database connection - Mailing list pgsql-novice

From Tom Lane
Subject Re: Database connection
Date
Msg-id 20400.1043823730@sss.pgh.pa.us
Whole thread Raw
In response to Database connection  ("Jill Jensen" <jill.jensen@aisn.net>)
Responses Re: Database connection
List pgsql-novice
"Jill Jensen" <jill.jensen@aisn.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

pgsql-novice by date:

Previous
From: Derek Clarkson
Date:
Subject: Silly Question about varchar(n)
Next
From: eurlix
Date:
Subject: DB corrupted ?