Skip to content

Instantly share code, notes, and snippets.

@alexbowers-tecmark
Created March 20, 2015 13:28
Show Gist options
  • Save alexbowers-tecmark/fb1e59ac3e6d8a0b1145 to your computer and use it in GitHub Desktop.
Save alexbowers-tecmark/fb1e59ac3e6d8a0b1145 to your computer and use it in GitHub Desktop.
Li3 Bug
<?php
$model = \app\models\Attributes::all([
'fields' => [
'distinct Attributes.id',
'name',
],
'conditions' => [
'deleted' => 0,
],
'order' => [
'order_num'
],
'limit' => 10,
'page' => 1,
]);
echo 'Data:' . print_r($model->data(), 1);
echo 'SQL:' . print_r($model->result()->resource()->queryString, 1);
// The count from the SQL result (when ran in adminer) is 5.
// The count from the SQL result from Li3 is 10. This doesn't appear to be related to the LIMIT, but simply getting the responses twice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment