I try to create my own helper but face a problem.
First i create a function called select. First if you see something wrong in this method pls tell me.
public function select($where = null, $order = null, $limit = null, $columns = '*') {
if (!$columns)
$this->db->select('*');
elseif (is_array($columns)) {
$columns = implode(',', $columns);
$this->db->select($columns);
}
if ($where)
$this->db->where($where);
if ($order)
$this->db->order_by($order);
if ($limit)
$this->db->limit($limit);
$query = $this->db->get('pasaj_register');
return $query;
}
and then i try to call this function like that
pasajItem = new pasajItem();
$a = $pasajItem->select();
echo $a;
However i take this error: