0
votes

I have a query in Kohana ORM and I need to filter by client, this is

client = ORM::factory('clients')->orders->with('commerce')->where('orders.id', '>', 12)->and_where('clients.id' >12)->find_all;

this part works, but the clients repeat themselves and I want the client that made the most current request to appear

1

1 Answers

0
votes

In documentation you can find nice method: distinct(true), but this probably won't work: You get fields from all tables.

If you need this list to display better way is add method to model and get it by using query builder