Wow you really great with this, lol Can i get you on speed dial? (just kidding)
Got it working but just took out the 'IS NULL' because it was throwing a database error. Like it didnt recognize IS NULL (Im using postgreSQL)
But this is how i got it working and didnt need to instantiate client:
Code:
$comp = new Company();
$comp->where_related('client_company', 'id')->get();
foreach($comp->all as $entry)
{
$data['comp'][$entry->id] = $entry->companyname;
}
Thanx again been stuck with this problem for a week now. Glad its finally sorted and it was so simple. Silly on my part trying the long way around.