I’m attempting to use get_where to grab a list of all database records where the owner is equal to the logged in user.
This is my function in my controller;
public function get_records(){ return $this->db->get_where('table_name', array('column_name' => value))->result(); }
This is how you can return data from database using get_where() method.