Welcome Guest, Not a member yet? Register   Sign In
get(), with limit dont work??
#1

[eluser]Lucas Caleto[/eluser]
Hi Guys, me again...

i am try this on my model:

$query = $this->db->get('produtos',0,3);
return $query;

And nothen come back




when i use this:

$query = $this->db->get('produtos');
return $query;

work, but i need to control this limit's


i dont understand the problem

some one can help me ?

thanks

Lucas
#2

[eluser]alexsancho[/eluser]
try

Code:
$query = $this->db->limit(0,3)->get(’produtos’);
    return $query;
#3

[eluser]Lucas Caleto[/eluser]
I try,
the same problem
nothen come back Sad
#4

[eluser]barbazul[/eluser]
the order of the parameters is wrong

when using liimit, the first parameter is the number of rows and the second is the starting offset.

your query is asking the DB to retrieve 0 rows starting from the third, and that's what you get: NOTHING Big Grin
#5

[eluser]Lucas Caleto[/eluser]
Thanksss Big Grin
now work Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB