Welcome Guest, Not a member yet? Register   Sign In
limit in mysql
#6

[eluser]xwero[/eluser]
[quote author="wish_bear" date="1204897606"]I think I might go with xwero's answer.. may be your data in the table are insufficient to show 20 records.. Smile[/quote]
I think you got the wrong idea the get method puts the limit before the offset which could confuse some people because in the (my)sql statement it's the other way around.
Code:
$this->db->get('table',10,20);
Returns
Quote:SELECT * FROM table LIMIT 20,10
So you need to have over 20 records. If you have 21 records you get one record as result.


Messages In This Thread
limit in mysql - by El Forum - 03-05-2008, 09:14 PM
limit in mysql - by El Forum - 03-05-2008, 09:20 PM
limit in mysql - by El Forum - 03-06-2008, 06:32 PM
limit in mysql - by El Forum - 03-07-2008, 01:23 AM
limit in mysql - by El Forum - 03-07-2008, 01:46 AM
limit in mysql - by El Forum - 03-07-2008, 02:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB