I wish to know if there is any way to refear to an empty querry result.
I want to implement a safety measure that prevents users from entering duplicate names in a DB. so I colect the value they enter in a textbox, then I create a querry wich checks the DB's name column for values that are identical to the user inputed value.
so basicly if no result is found it should continue to add the entry to the DB.
$sql_name_Check="SELECT DISTINCT table.name
FROM table
WHERE table.nume = '$name'";
$rez_name_Check = mysql_query($sql_name_Check) OR DIE (mysql_error());
IF ( ISNULL ($rez_name_Check) )
{
code for adding the new entry
}
SO is there any way to check if a querry result is NULL and if so to execute a series of instructions?