Hello.
How is it that, when i try to join a table twice, it only joins the second table, and ignores the first one?
This is my code:
$user = self::query()
->columns(array('COUNT(today.day) as day', 'COUNT(month.month) as month', 'Users.id'))
->join('Blogs', 'Users.id = Blogs.userid')
->join('Statistics', 'Blogs.id = today.blogid AND today.day = 22', 'today') // THIS get's replaced...
->join('Statistics', 'Blogs.id = month.blogid AND month.month = 1', 'month') // THIS works
->where('Users.id = :userid:', array('userid' => $id))
->orderBy('Users.id DESC')
->limit('1')
->execute();
return $user;