Ola! I am also new to grocery_CRUD...did you manage to get this working? I am interested in doing the same. I have 2 tables, I can bring up the information for display.. now, I want to multiply the total_weight by the cpk1, cpk2, cpk3 and display the result in a table (or insert them into the cpk columns). Any help will be much grateful :-) muchos gracias/Thanks
public function orders()
{
$crud = new grocery_CRUD();
$crud->set_table('orders');
$crud->set_subject('Orders');
$crud->columns('job_number','total_quantity','total_weight','total_volume');
$crud->fields('job_number','total_quantity','total_weight','total_volume');
$crud->unset_add();
$crud->unset_delete();
$output = $crud->render();
$this->_example_output($output);
}
public function rate_exsyd()
{
$crud = new grocery_CRUD();
$crud->set_table('3pnrate_exsyd');
$crud->set_subject('Rates Ex-SYD');
$crud->columns('zone_loc','zone_id','basic_rate','fuel_charges','cubic_factor','cpk1','cpk2','cpk3','S1','S2','S3','SATC1','SATC3','SATC5','C1');
$crud->fields('zone_loc','zone_id','basic_rate','fuel_charges','cubic_factor','cpk1','cpk2','cpk3','S1','S2','S3','SATC1','SATC3','SATC5','C1');
$crud->unset_add();
$crud->unset_delete();
$output = $crud->render();
$this->_example_output($output);
}