where - update record with codeigniter active record -
in controller, calling model function following:
$this->sales_model->softdelete_order($this->input->post('ordernumber'));
what want do, in model is
update customer_order_summary set deleted='1' customerorderid='123'
where 123 $this->input->post('ordernumber')
my model syntax is:
function softdelete_order($q){ $this->db->set('deleted','1'); $this->db->where('customerorderid', $q); $query = $this->db->update('customer_order_summary'); } this not working or outputting errors.
the model preloaded , post information posting , echoing correctly purely model syntax issue think.
help appreciated always.
thanks,
after
$query = $this->db->update('customer_order_summary'); add
$this->db->last_query(); to see query , can repair there.
Comments
Post a Comment