Kohana ORM get one record in many-to-many relationship
Posted
by booze2go
on Stack Overflow
See other posts from Stack Overflow
or by booze2go
Published on 2010-04-28T11:44:45Z
Indexed on
2010/04/29
13:27 UTC
Read the original article
Hit count: 490
Hi Guys,
I've got two tables (items / tags). Item has and belongs to many tags - tag has and belongs to many items.
It's no problem for me to fetch all related tags like:
$item = ORM::factory('item', 4);
foreach($item->tags as $tag){....}
But how can i fetch only one... and maybe a specific one?
Thanks in advance!
© Stack Overflow or respective owner