【发布时间】:2013-06-28 13:53:31
【问题描述】:
我对这个很感兴趣。我正在使用 Codeigniter 控制器。
我需要更新下面代码中“DATA HERE”所在的订单状态。
基本上这是我需要做的,在名为“orders”的表中找到 $orderid,找到“status”并将其更新为文本“Paid”。
$orderid = $id;
if($this->input->post("status")=="OK" && $this->input->post("step")=="Confirmation" && $this->input->post("orderhash")==$orderHashOrg)
{
// DATA HERE
}
非常感谢任何帮助。
这是我当前的代码
$updateData=array("status"=>"Paid");
if($this->input->post("status")=="OK" && $this->input->post("step")=="Confirmation" && $this->input->post("orderhash")==$orderHashOrg)
{
$d = $this->db->get('offers_orders');
$this->db->select('status');
$this->db->where('order_number', $id);
$orderdata = $d->result_array();
$this->db->update("offers_orders", $updateData);
}
【问题讨论】:
-
先写你的代码,我们可以帮忙修复bug
-
刚刚更新...谢谢!
标签: php mysql codeigniter