Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Preciso converter algumas funções php mysql para postgresql
Alguem pode me ajudar? desde já agradeço a atenção
function connect()
{
$this->id = mysql_connect($GLOBALS['conf']['host'], $GLOBALS['conf']['username'], $GLOBALS['conf']['password']) or die(mysql_error());
if ($this->id) {
$this->connection = true;
$this->select();
} else {
$this->connection = false;
$this->error = mysql_error($this->id);
}
}
// Disonnect, then set $this->connection to true
// if connected or false if not connected
function disconnect()
{
if ($this->connection) {
mysql_close($this->id);
$this->connection = false;
}
}
function status($arg)
{
switch ($arg) {
case 'die':
if ($this->connection = false) {
echo $this->error;
exit;
}
return false;
break;
default:
return $this->connection;
}
}
function select()
{
mysql_select_db($GLOBALS['conf']['database'], $this->id) or die(mysql_error());
}Carregando comentários...