Jump to content


Srowako

Member Since 08 Aug 2012
Offline Last Active Nov 08 2012 07:38 AM
-----

Topics I've Started

change the delete function to update x_status=0

30 October 2012 - 09:02 AM

Dear all,

there something wrong with my code:
$crud->set_table('aap_qt')
->set_subject('General Quotation')
->columns('risk_location','occupation','period','rate','discount','brokerage','deductibles','clauses','note');
$crud->unset_delete();
$crud->add_action('Delete', '', '','ui-icon-minus',array($this,'delete_status_row'));
$output=$crud ->render();
$this->_v('quotations',$output);


function delete_status_row($primary_key, $row){
$delete_status_update = array(
"status" => 0,
"user_delete" => $this->dx_auth->get_user_id(),
"time_delete" => date('Y-m-d H:i:s')
);
return $this->db->update('aap_qt',$delete_status_update,array('id' => $row));
}

Thank you for your attention.