I managed to sort this out.
for anyone else looking for an anser i did the following.
I followed the same technique as checking on insert, creating a recordset filtered by the new value i wanted to insert and using the server validations to check if the recordset was empty.
the teqnique for update is the same, although as well as filtering the table to insert into by the value you want to insert also add to the where clause the following:
AND myColulmnID != myID
(mycolulmnID is the unique key for the record and myID should be set to $_POST["WADAUpdateRecordID"])
this way we check all records for the new value, except the current record we arew trying to update.
the full recordset code would look something like this:
$colname_slugcheck = "-1";
if (isset($_POST['slug_dct'])) {
$colname_slugcheck = (get_magic_quotes_gpc()) ? $_POST['slug_dct'] : addslashes($_POST['slug_dct']);
}
$myid_slugcheck = "-1";
if (isset($_POST["WADAUpdateRecordID"])) {
$myid_slugcheck = (get_magic_quotes_gpc()) ? $_POST["WADAUpdateRecordID"] : addslashes($_POST["WADAUpdateRecordID"]);
}
mysql_select_db($database_albionwines, $albionwines);
$query_slugcheck = sprintf("SELECT id_dct, slug_dct FROM drinkcats_dct WHERE slug_dct = %s and id_dct != %s", GetSQLValueString($colname_slugcheck, "text"),GetSQLValueString($myid_slugcheck, "int"));
$slugcheck = mysql_query($query_slugcheck, $albionwines) or die(mysql_error());
$row_slugcheck = mysql_fetch_assoc($slugcheck);
$totalRows_slugcheck = mysql_num_rows($slugcheck);?>