function bundle_entry_exists($bundle_id, $site_id = 1) { $result = $this->db->select('id')->from('stash')->where('bundle_id', $bundle_id)->where('site_id', $site_id)->limit(1)->get(); if ($result->num_rows() == 1) { return TRUE; } else { return FALSE; } }