Hello,
I have view: as shown at capture view.
Then i click Edit as shown at capture.
I Have question :
how i can use the information Jenis Unit become where condition in my code.
public function ChooseOperator()
{
$comp = "1";
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('projectunit');
$crud->set_relation_n_n('unitsc', 'projectunitselec', 'unit', 'idprojectunit', 'idunit', 'unitcode','priority',array('unit.sertifikatid' => $comp ));
//$crud->unset_columns('priority');
//$crud->add_action('Detail Unit', '', 'rmi/ChooseOperator/read','ui-icon-plus');
$crud->set_relation('proid','project','proname');
//$crud->set_relation('sertifikatid','sertifikat','sertifikatname');
$crud->fields('proid','sertifikatid','unitsc');
$crud->add_action('Detail Unit', '', 'rmi/ChooseOperator/edit','ui-icon-plus');
$crud->display_as('proid','Project Name');
$crud->display_as('sertifikatid','Jenis Unit');
$crud->display_as('unitsc','Unit Dipakai');
// $crud->fields('proname');
// $crud->display_as('proname','Nama Project');
// $crud->order_by('proname','asc');
// $crud->field_type('proid', 'hidden', $proid);
// /$crud->callback_column('proname',array($this,'_callback_webpage_url'));
$output = $crud->render();
$this->_rmi_output($output);
// print($proid);
// print_r($output);
}
So i want value of $comp become a jenis Unit, why i need because i want only show specific information for set_relation.
really need a help ...
Regards,