[eluser]mddd[/eluser]
If you get a row through the $query->row() method, you get an object with properties representing the columns.
So row()->member_id is what you are looking for.
Code:
$query = $this->db->query('SELECT member_id FROM exp_members ORDER BY member_id DESC LIMIT 0, 1');
if ($query->num_rows()==1)
{
$member_id = $query->row()->member_id;
}