Question : insert query in ci
Answered by : nipun-agarwal
function order_summary_insert() $OrderLines=$this->input->post('orderlines'); $CustomerName=$this->input->post('customer'); $data = array( 'OrderLines'=>$OrderLines, 'CustomerName'=>$CustomerName ); $this->db->insert('Customer_Orders',$data);
}
Source : | Last Update : Mon, 23 Aug 21
Question : codeigniter 3 update
Answered by : alberto-peripolli
$data = array( 'title' => $title, 'name' => $name, 'date' => $date
);
$this->db->where('id', $id);
$this->db->update('mytable', $data);
Source : | Last Update : Fri, 13 Nov 20
Question : cideigniter orLike()
Answered by : sameh-shahin
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'
Source : https://codeigniter.com/userguide3/database/query_builder.html | Last Update : Tue, 27 Oct 20