Welcome Guest, Not a member yet? Register   Sign In
Help creating "next" button
#4

[eluser]Michael Wales[/eluser]
Just query the database, ordered by id DESC, where the id is greater than the current record's ID.

Code:
$this->db->order_by('id', 'DESC');
$query = $this->db->get_where('records', array('customer_id' => $customer_id, 'id >' => $current_record), 1, 0);
if ($query->num_rows()) > 0) {
  return $query->row();
}
return FALSE;


Messages In This Thread
Help creating "next" button - by El Forum - 02-03-2009, 02:46 PM
Help creating "next" button - by El Forum - 02-03-2009, 03:41 PM
Help creating "next" button - by El Forum - 02-03-2009, 03:46 PM
Help creating "next" button - by El Forum - 02-03-2009, 06:09 PM
Help creating "next" button - by El Forum - 02-04-2009, 11:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB