When i am running my query
$dbhost='localhost';
$dbuser='dbuser';
$dbpass='dbpass';
$dbname='dbname';
$conn=pg_connect('host='.$dbhost.' dbname='.$dbname.' user='.$dbuser.' password='.$dbpass);
if (!$conn) {
echo "An error occured.\n";
exit;
}else{
echo "connection occured";
}
echo $conn;
$insert=pg_query($conn, "Insert into `advertiser_regidetdir`
(user_name,domain_name,user_email,publickey,privatekey, refresh_count )
values('$user','$domain','$email','$pubkey','$pritekey',0)");
if (!$insert) {
echo "An error occured.\n";
exit;
}
I am getting output somthing like this....... connection occured Resource id #2An error occured. Why this error is coming.