Re: Checking multiple columns for duplication checking in model
Model { > var $validate = array( > 'field1' => array( > 'rule' => array('isUniqueMulti', array('field1', 'field2')), > 'required' => TRUE, > 'message' => 'Error Message',
Checking multiple columns for duplication checking in model
Is there a way in a model to verify that a record does not exist already that matches a certain criteria. In the database table are three columns: id, list_id and product_id. I would like to be able to tell if there already exists a record with the same list_id AND product_id as the one being added