Hi there ,
How to write multiple update_batch query in codeigniter?
My script is not working ...
Please give some solutions for multiple update row using update_batch...
getting below Error:
A Database Error Occurred
You must use the "set" method to update an entry.
Filename: D:\xampp\htdocs\DEAL\system\database\DB_active_rec.php
Line Number: 1273
mycontroller :
$this->deal_model->deal_imghighlightupdate($id);
my model:
Class Deal_model extends CI_Model
{
public function deal_imghighlightupdate($id)
{
$dataimages = array();
if(isset($_FILES["image1"])) {
$this->upload->initialize($config);
$dataimages[] = array('merchant_deals_id'=>$id, 'deal_images' => $_FILES["image1"]["name"]);
}
$dataimages = array();
if(isset($_FILES["image2"])) {
$this->upload->initialize($config);
$dataimages[] = array('merchant_deals_id'=>$id, 'deal_images' => $_FILES["image2"]["name"]);
}
$dataimages = array();
if(isset($_FILES["image3"])) {
$this->upload->initialize($config);
$dataimages[] = array('merchant_deals_id'=>$id, 'deal_images' => $_FILES["image3"]["name"]);
}
$this->db->update('deal_images', $dataimages, 'merchant_deals_id');
}
}