unique_fields

void unique_fields( array $var )
Quick Description: Add the fields that they are as UNIQUE in the database structure
Available for version >= 1.4

Add the fields that they are as UNIQUE in the database structure

Example:

public function webpages()
{
$crud = new grocery_CRUD();
 
$crud->set_table('webpages');
$crud->order_by('priority');
$crud->set_subject('Webpage');
$crud->columns('menu_title','url','status','priority');
$crud->unique_fields(array('menu_title','url'));
 
$output =   $crud->render();
 
$this->_view_output($output);
}