$q="DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = ".(int)$entryId." AND property = '".serendipity_db_escape_string($prop_key)."'";
$q="UPDATE {$serendipity['dbPrefix']}entryproperties SET value = '".serendipity_db_escape_string($prop_val)."' WHERE entryid = ".(int)$entryId." AND property = '".serendipity_db_escape_string($prop_key)."'";
}else{
$q="DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = ".(int)$entryId." AND property = '".serendipity_db_escape_string($prop_key)."'";