Welcome Guest, Not a member yet? Register   Sign In
complex query or subquery to 'ignore' initial database records
#8

[eluser]jude[/eluser]
I removed the limit, and increased the records to 25.

Here is the revised code:

function get_focus_news ($n1) {

$this->db->select(‘title, id’);
$this->db->where(‘nid =’, $n1); [nid = wimax]
$this->db->order_by(‘id desc’);
$query = $this->db->get(‘focus’, 25, 6);
return $query->result();
}

Here I get 25 wimax stories after the db ignores the first six wimax stories.
What's needed is to get 25 wimax stories after the db ignores the first 6 db records (maybe perhaps 4 non-wimax stories and 2 wimax stories). In this instance I get the third wimax story onwards.

Terribly confusing, but that's my problem.

Thanks


Messages In This Thread
complex query or subquery to 'ignore' initial database records - by El Forum - 07-15-2009, 12:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB