[eluser]jude[/eluser]
Maybe an example will clarify. Suppose there's a list of stories on telecom, and I want to access only those stories on WiMax. BESIDES, I also want the five initial stories in the database(whatever they might be, WiMax or other) ignored, since I have already given them prominantly as lead stories.
If I run the code I gave earlier, the first five records ON WIMAX are identified and ignored, and the remaining WiMax stories delivered.
One needs a code that ignores the first five records in the database, and does the selection (of stories on WiMax) from the remaining (N minus 5) records.
Maybe a complex query or subquery is needed?
function get_focus_news ($n1) {
$this->db->select('id, nid, date, title, intro');
(N.B. from table 'focus' ignoring the first five records)
$this->db->where('nid =', $n1);
$this->db->order_by('id desc');
$query = $this->db->get('focus', 6, 0); (get first six items with the required 'nid')
return $query->result();
}
Thanks