Welcome Guest, Not a member yet? Register   Sign In
Problems with querys
#4

[eluser]James Gifford[/eluser]
Oh, I overlooked something critical!

In your example query, you're getting a result that only has one row. So no matter how many times you call next_row and previous_row you'll always get the same row.

You'll need to change your query so that it returns more than one row. Something like:
Code:
$this->db->where(’id >=’, $id - 1)->where(’id <=’, $id + 1);
$query = $this->db->get(’entries’);


Messages In This Thread
Problems with querys - by El Forum - 03-05-2008, 05:02 PM
Problems with querys - by El Forum - 03-05-2008, 05:09 PM
Problems with querys - by El Forum - 03-05-2008, 05:21 PM
Problems with querys - by El Forum - 03-05-2008, 05:25 PM
Problems with querys - by El Forum - 03-05-2008, 05:29 PM
Problems with querys - by El Forum - 03-05-2008, 05:34 PM
Problems with querys - by El Forum - 03-05-2008, 05:35 PM
Problems with querys - by El Forum - 03-05-2008, 05:43 PM
Problems with querys - by El Forum - 03-05-2008, 06:41 PM
Problems with querys - by El Forum - 03-05-2008, 06:59 PM
Problems with querys - by El Forum - 04-04-2008, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB