mjda
Well-known member
I've hit an issue here that really has me scratching my head.
I'm setting a variable like this:
Here's what that function looks like:
Everything seems to be working fine, as in I get no errors. The issue, though, is that $myList only has 1 result, instead of 2. However, if I copy/paste the query from the debug page into phpMyAdmin, I get 2 results, as expected.
Anyone have any ideas as to what could be happening with that other result when I run
It's probably also worth noting that if I use
I'm setting a variable like this:
$myList = $myRepo->getMyListForIndex()->fetch();
Here's what that function looks like:
Code:
public function getMyListForIndex()
{
$finder = $this->finder('Vendor\Addon:Class');
$finder
->where('attach_count', '>', 0)
->with(['Attachment'])
->order('my_id', 'desc')
->limit(2);
return $finder;
}
Everything seems to be working fine, as in I get no errors. The issue, though, is that $myList only has 1 result, instead of 2. However, if I copy/paste the query from the debug page into phpMyAdmin, I get 2 results, as expected.
Anyone have any ideas as to what could be happening with that other result when I run
$myList = $myRepo->getMyListForIndex()->fetch();
?It's probably also worth noting that if I use
->limit(10)
then I only get 8 results, unless I copy/paste into phpMyAdmin where I get all 10 results.