[eluser]Unknown[/eluser]
Hi all, I'm new to CodeIgniter and need some help with pre-fetching the next record in database from a result.
Essentially it's a list of destinations, I need to pre-fetch the next destination in the list.
Is there an easy way to do this?
My current model contains:
Code:
class Times_model extends Model{
function __construct(){
parent::Model();
}
function get_records($limit, $offset){
$query = $this->db->select('*')
->from('times')
->join('vehicles', 'vehicles.vehicle_id = times.vehicle_id')
->join('locations', 'locations.location_id = times.location_id')
->where('complete', 0)
->where('view', 1)
->order_by('time, type', 'asc')
->limit($limit, $offset);
$data = $query->get()->result();
return $data;
}
}
Any and all help is appreciated.
PS