Welcome Guest, Not a member yet? Register   Sign In
Datamapper (Find rows NOT in my join table)
#2

[eluser]tdktank59[/eluser]
well 1 option is to do something like this

Code:
$u = new User();
$u->where('id',$id);
$u->projects()->get();

foreach ($u->projects->all as $projects)
{
$project_ids = array($projects->id);
}

$p = new Project();
$p->where_not_in('id',$project_ids)->get();

see where im going with this?


Messages In This Thread
Datamapper (Find rows NOT in my join table) - by El Forum - 03-09-2009, 02:40 PM
Datamapper (Find rows NOT in my join table) - by El Forum - 03-10-2009, 03:24 PM
Datamapper (Find rows NOT in my join table) - by El Forum - 03-11-2009, 06:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB