Welcome Guest, Not a member yet? Register   Sign In
sparks AR and CI issue Unknown column 'limit' in 'where clause'
#1

[eluser]debow[/eluser]
I'm using CodeIgniter and AR trying to convert my old site code to AR. I've got the following query setup but get the below error. I'm new to both CI and AR so not sure why it doesn't like what I have. I followed the AR example on setting up this query so not sure if the issue is with SPARKS/CI or AR.

Thanks for any suggestions.

Old query:
Code:
$results = $this->Fs_model->search($limit, $offset, $sort_by, $sort_order);


New query:
Code:
$results = Fsystem::find('all', array('limit' => 10, 'offset' => 0, 'sort_by'=> 'ostype asc'));


Error:
Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message '42S22, 1054, Unknown column 'limit' in 'where clause'' in C:\wamp\www\dsp\sparks\php-activerecord\0.0.1\vendor\php-activerecord\lib\Connection.php on line 312




Theme © iAndrew 2016 - Forum software by © MyBB