I Am trying to update tenders
table in my db but for some reasons its updating the table with zeros.
After getting the last_query()
string and running it from phpmyadmin
window it updates successfully but using active records it does not.
Other queries are working properly apart from this.
What might be the problem with my code?
Here is my code
$data=array(
'tender_type_type_id' => $this->input->post('tender_type_id'),
'Description' => $this->input->post('tdescription'),
'obtaining_documents' => $this->input->post('obtaining_docs'),
'submission_process' => $this->input->post('submission_proc'),
'obtaining_documents' => $this->input->post('obtaining_docs'),
'applicationfee' => $this->input->post('applicationfee'),
'Location' => $this->input->post('location'),
'WebLink' => $this->input->post('url'),
'clossing_date' => $this->input->post('endson'),
'opening_date' => $this->input->post('openedon'),
'title' => $this->input->post('title'),
'publication_date' => date('Y-m-d H:i:s', time()),
'attachments' => $this->input->post('upload'),
'Organization_OrganizationID' => $this->input->post('organizationid'),
'tender_category_category_id' => $this->input->post('categoryid'),
'Towns_TownID' => $this->input->post('townid'),
'Accounts_AccountID' =>$this->input->post('accountid'),
'tender_status_status_id' => $this->input->post('tender_status_id'),
'Location' => $this->input->post('location'),
'clossing_date' => $this->input->post('endson'),
'opening_date' => $this->input->post('openedon'));
$id=$this->uri->segment(3);
$this->db->where('TenderID',$id);
$this->db->update('tenders',$data);
return print_r($this->db->last_query());