Welcome Guest, Not a member yet? Register   Sign In
SOLVED: $this->db->limit("5,0"); is not taking.
#1

[eluser]internut[/eluser]
Hey All,

Working with this:

Code:
$this->db->where('status',"$user_status");
$this->db->order_by("$sort", "$direction");
$this->db->limit("$config[per_page],$start");
$data['query'] = $this->db->get('users');

Everything above works except the limit line. Its spitting out all the records.

If I move to:

Code:
$data['query'] = $this->db->query("SELECT * FROM users WHERE status='$user_status' ORDER BY $sort $direction LIMIT $start,$config[per_page]");     // query time

It works perfectly... Any thoughts?
#2

[eluser]internut[/eluser]
Nevermind I should not have been using quotes in:

$this->db->limit("$config[per_page],$start");




Theme © iAndrew 2016 - Forum software by © MyBB