Hello @larasmith,
In Grocery CRUD community, you are allowed to have faked fields, however you can't use it for search, ordering... e.t.c.
In Grocery CRUD Enterprise on the other side, you can use custom Queries in order to achieve that. So that simply means that you have a more powerful tool to use. You will need to use custom models for that. More specifically you will need to use the setModel (instructions at the link) and you will use your own query by extending the getList() with your own needs.
More specifically as you are using Codegniter, you can do something like that:
public function getList() {
$order_by = $this->orderBy;
$sorting = $this->sorting;
// Your own custom query with a specific select!
if ($order_by !== null) {
$this->db->order_by($order_by. " " . $sorting);
}
if (!empty($this->_filters)) {
foreach ($this->_filters as $filter_name => $filter_value) {
$this->db->like($filter_name, $filter_value);
}
}
if (!empty($this->_filters_or)) {
foreach ($this->_filters_or as $filter_name => $filter_value) {
$this->db->or_like($filter_name, $filter_value);
}
}
$this->db->limit($this->limit, ($this->limit * ($this->page - 1)));
$results = $this->db->get($this->tableName)->result_array();
return $results;
}
I also have the code at gist if someone wants a full example of a codeigniter specific model: https://gist.github.com/scoumbourdis/2b75b1910b343ea00ce1fb310fffe02c
Hope that it helped
Thanks
Johnny