I am using cakephp 2.6. I have
payment_method fields in mysql table which store the values like
Now my question is that how can i check if new posted payment method id is available in the
$data['PaymentMaster']['payment_method'] = 52
$paymentDetail = $this->PaymentMaster->find('first',array('conditions'=>array('NOT' => array('payment_method'=>$data['PaymentMaster']['payment_method']))));
I want to check if value not in database then add in to database other wise fire an error that
Error: The rule is contradicting with the other rule, please check the rule.
Any help would be appreciated. Thanks in advance