At least from my point of view the easiest way is to make you own simple model (not by extending the GC model, just a new one!).
Probably the best way to do it is,
(sample code, file itemmodel.php under application/models)
<?php
class itemmodel extends CI_Model {
function __construct()
{
parent::__construct();
$this->load->database();
}
public function get_healing_techniques_id_description()
{
$query = "SELECT `id`, `description` FROM `groups` WHERE `activities_id` IN (SELECT `id` FROM (`activities`) WHERE `description` LIKE 'H-%' ORDER BY `id`)";
$result = $this->db->query($query);
return $result;
}
//... }
and then on your controller,
$this->load->model('itemmodel');
// multiple healing techniques
$healings = $this->itemmodel->get_healing_techniques_id_description();
foreach ($healings->result() as $row)
{
$myarray2[$row->id] .= $row->description;
}
$this->grocery_crud->field_type('healing_techniques_ids','multiselect', $myarray2);