[eluser]leviathan28[/eluser]
I'm using the latest mysql_driver from the codeigniter svn.
Code:
$state = new State();
$state->get_by_id(State::STATE_NEW);
$state->import->limit(1);
$lim = $state->import->db->ar_limit;
echo("[$lim]"); // should print [1] to the browser
$state->import->get();
$state->import->check_last_query(); // renders out the last query
results in
Code:
[1]
SELECT `imports`.*
FROM (`imports`)
LEFT OUTER JOIN `imports_states` as imports_states ON
`imports`.`id` = `imports_states`.`import_id`
LEFT OUTER JOIN `states` as states ON `states`.`id` =
`imports_states`.`state_id`
WHERE `states`.`id` = '1'
So - still no limit in the query.
When I remove line 743 in datamapper.php $this->limit($limit, $offset);, it works. Could it be that the limit I set is replaced by the default values of the get() function?