Your have forgot to do the:
$this->db->get();
Your model should be like:
<?php
class Your_model extends CI_Model
{
public $db;
public function __construct()
{
parent::__construct();
$this->db = $this->load->database('default',true);
}
public function function_name()
{
$this->db->select('file_name');
$this->db->from('images_table');
$this->db->where_in('id', $id_array_img);
$query = $this->db->get(); // add this
$result = "";
if($query->num_rows() > 0)
$result = $query->result_array();
else
$result = "No result";
print_r($result);
}
}
Explanation:
Without $this->db->get();, you are just generating the query, but not firing it.