Hi, I'm using the following code in "Before record added" to avoid duplication.
It works well, only I would find a way to preclude judicial fields null. In fact, if there are two records with the field is null the query true. Thanks.
global $conn;
$strSQLExists = "select VacatureBron from _bedrijven where VacatureBron='".$values["VacatureBron"]."'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
echo "<center><b><font color=red>Company already exists in database!</font></b></center>";
return false;
}