⚠ 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

if row > 5 displays the entry else not displays



kalashnik
  • profile picture
  • Member

Posted 17 May 2018 - 06:46 AM

Hello,

 

I'm noob, you can help me

 

I have this code

 

public function plan_de_tratare_a_riscurilor ()
{
$crud = new grocery_CRUD();
$crud->set_table('nomenclator_riscuri');
$crud->columns('probabilitate','valoare_impact','risc','denumirea_resursei','v','a','mecanism_de_reducere','obiective',
'masuri_de_securitate','indicatori_de_performanta');
$crud->callback_column('risc', array($this, '_callback_column_risc'));
$crud->set_subject('Plan de tratare a riscurilor'); 
$output = $crud->render(); 
$data['judul'] = 'Plan de tratare a riscurilor'; 
$data['crumb'] = array( 'Plan de tratare a riscurilor' => '' ); 
$template = 'admin_template'; 
$view = 'grocery'; 
$this->outputview->output_admin($view, $template, $data, $output); 
} 
public function _callback_column_risc ($value, $row) {     
$probabilitate = $row->probabilitate;     
$valoare_impact = $row->valoare_impact;     
$risc=$probabilitate * $valoare_impact;      
 return $risc; 
}
How to do if column 'risc'>5 displays the entry else not displays