Ok, I've got the following MySQL connection working in PHP:
Now, I cannot figure out how to change this to a PostgrSQL connection. I've tried (to begin with):
This gives me the error:
I know that I'm using the correct username and password, because I was able to create tables with this user earlier with a Perl script.
Any help/thoughts would greatly be appreciated!
X
Code:
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());
Now, I cannot figure out how to change this to a PostgrSQL connection. I've tried (to begin with):
Code:
$this->connection = pg_connect("host=localhost user=me password=#y7u20") or die(pg_last_error());
This gives me the error:
Code:
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: Password authentication failed for user "me"
I know that I'm using the correct username and password, because I was able to create tables with this user earlier with a Perl script.
Any help/thoughts would greatly be appreciated!
X