dongqishou7471 2014-05-17 12:38
浏览 18

CI Active Record Query未更新

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());
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码
    • ¥15 matlab代码解决,怎么运行
    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法