Hi, I'm having trouble connecting to the DB with postgres using PHP I attach the php code of the class connection, when I create an object connections and I call the method to connect this does not return anything to me, is there any way to see the error as mysql_error ??
class Conexiones
{ /*ATRIBUTOS*/
private $servidor='localhost';
private $bd='baseclientes';
private $user='postgres';
private $password='hom';
private $postgres= 0;
/** METODOS */
public function conectar ()
{
$pgConnectionString = "host='$this->servidor' port=5432 dbname='$this->bd' user='$this->user' password='$this->password'";
if ($this->postgres= pg_connect($pgConnectionString))
{return 0;}// todo ok
else {return 1;}
} /* FIN METODO CONEXION*/
} /*FIN CLASE CONEXIONES*/
ps: I never worked with postgres, it's likely that I'm missing somewhere, greetings