Jump to content


if row > 5 displays the entry else not displays

if else row crud

  • Please log in to reply
No replies to this topic

#1 kalashnik

kalashnik

    Newbie

  • Members
  • Pip
  • 1 posts

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

 

 

 







Also tagged with one or more of these keywords: if, else, row, crud

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users