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

Re: MySQL --> PostgreSQL with PHP

From: Helgi Örn Helgason <sacredeagle(at)gmail(dot)com>
To: Mark Kelly <pgsql(at)wastedtimes(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: MySQL --> PostgreSQL with PHP
Date: 2010-10-09 09:09:04
Message-ID: AANLkTikT4Lnh5Tyb+Z4-0dE4MXPhykFpJ1WayrBaO_7r@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On 9 October 2010 00:47, Mark Kelly <pgsql(at)wastedtimes(dot)net> wrote:
>
> //============ START CODE ===================
> // Connect to the PostgreSQL server
> // Build a string to specify the connection parameters, NOT pass them as args.
> $connectionString = "host=$hostName dbname=$databaseName ".
>        "user=$username password=$password";
> if (!$connection = pg_connect($connectionString)) {
>        die("Cannot connect: ".pg_last_error());
>

I forgot, this is my connection file:

<?php
$connstr = "host=localhost port=5432 dbname=database user=me password=yes";
$dbh = pg_connect($connstr);
if      ($dbh)
{
echo "";
}
else
{
echo "No connection has been established<br>";
}
?>

Could there be a conflict between these two?

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2010-10-09 14:47:21
Subject: Re: permissions failure to copy csv data
Previous:From: Helgi Örn HelgasonDate: 2010-10-09 08:56:33
Subject: Re: MySQL --> PostgreSQL with PHP

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