Welcome Guest, Not a member yet? Register   Sign In
DMZ Issues
#2

[eluser]David Cassidy[/eluser]
[quote author="harbingerkun" date="1264938208"]
Code:
public function index()
    {
        $latest = new Article();
        $latest->get();
        
        print_r($latest->all);
        
        $this->output->enable_profiler(TRUE);
        
    }
[/quote]

I believe the solution you are looking for is:
Code:
public function index()
    {
        $latest = new Article();
        $latest->include_related('author', '*', FALSE, FALSE);
        $latest->get();
        
        foreach($latest->all as $article)
        {
            print_r($article);
        }
        
        $this->output->enable_profiler(TRUE);
        
    }

If you check the source of the page, you'll see that the array does indeed include your author information.


Messages In This Thread
DMZ Issues - by El Forum - 01-30-2010, 11:43 PM
DMZ Issues - by El Forum - 01-31-2010, 01:25 AM
DMZ Issues - by El Forum - 03-26-2010, 01:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB