[eluser]molistok[/eluser]
Hi,
I have this tables:
groups (id, name, ...)
group_types (id, group_id, type_id)
types (id, name)
This is the relations between tables:
groups has many group_types
group_types belongs_to groups and types
types has many group_types
Therfore if I want get all group_types of group with id=66 I will do this:
sql:
SELECT group_types.* from group_types where group_id=66
If I do this I get all of rows (that's correct)
But if I try to do this in my application with Ignited record:
public function find($group_id)
{
$this->where('group_id',$group_id);
return $this->find_all();
}
I only get first row.
Can any help me please?
Thanks.