⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

unique field



doodz
  • profile picture
  • Member

Posted 21 August 2015 - 15:10 PM

unique field trigger in update. how i will prevent this . this is my code 

$crud = new grocery_CRUD();
 
$crud->set_table('ekom_member');
$crud->set_subject('Member');
$crud->columns('LastName', 'FirstName', 'Email', 'Password');
 
 
 
$crud->add_fields('LastName', 'FirstName', 'Email', 'Password','confirm_password');
$crud->edit_fields('LastName', 'FirstName', 'Email', 'Password','confirm_password');
 
$crud->set_rules('Password', 'Password', 'required');
        $crud->set_rules('confirm_password', 'Password Confirmation', 'required|matches[Password]');
        $crud->set_rules('Email', 'Email', 'required|valid_email|is_unique[ekom_member.Email]');
 
$crud->callback_before_update(array($this,'unset_email'));
 
$output = $crud->render();
 
$this->_example_output($output);   

 


doodz
  • profile picture
  • Member

Posted 22 August 2015 - 02:45 AM

help pls 


doodz
  • profile picture
  • Member

Posted 22 August 2015 - 04:46 AM

help pls