Dannymh
Active member
I just converted a query over to finder and the query works all but one thing, it puts the indexed ID as the array key rather than assigning these as 0+
so I would expect a results of
instead what it appears to do is us the ID
that works well if I am just going to loop through those results, however in my results for this I am looking at specific key values which would look something like
Super simple version but I was hoping to traverse the results array by a location but if it takes the ID I can't do that.
Did I miss something?
My Finder looks like
so I would expect a results of
Code:
$finder->0>whatever
instead what it appears to do is us the ID
Code:
$finder->79->whatever
$finder->14->whatever
that works well if I am just going to loop through those results, however in my results for this I am looking at specific key values which would look something like
Code:
if($finder->0->whatever !="whatIwant")
{
//we want to grab 3rd item in the list because it has to exist there
$whatIwant = $finder->2->whatever;
}
Super simple version but I was hoping to traverse the results array by a location but if it takes the ID I can't do that.
Did I miss something?
My Finder looks like
Code:
$highamount = $this->finder('ST\Ledger:Amounts')
->where('thread_id', '=', $ledger->thread_id)
->order('max_amount', 'DESC')->order('input_time', 'ASC')
->fetch();