I have the following code
$conn = pg_connect("dbname=mick user=postgres");
$result=pg_exec($conn, "insert into prods values ('$partno','$brief',$price
,$verdesc_string,'$category',$freemod_string,
$active_string,$misc_string)");
print "mick".pg_errormessage($conn)."mick";
When I try and put in a product a second time, because it's a key it should not let me as the value is not unique. This is fine it rejects it. It prints the value of pg_errormessage but also prints out a warning above that. How do I stop it displaying the warning? It looks like the following.
Warning: PostgresSQL query failed: ERROR: Cannot insert a duplicate key into unique index prods_pkey in /home/httpd/html/toolsdev/config/InsertDetails.php3 on
line 62
mickERROR: Cannot insert a duplicate key into unique index prods_pkey mick
Cheers,
Mick