Commit d82f539d authored by Jonathan.Wage's avatar Jonathan.Wage

MInor fix to syntax.

parent cd8452aa
......@@ -6,9 +6,9 @@ $query = new Doctrine_Query();
$query->select('u.*, COUNT(p.id) num_posts')
->from('User u, u.Posts p')
->where('u.id = ?', 1)
->groupby('u.id')
->execute();
->groupby('u.id');
echo $query->Posts[0]->num_posts . ' posts found';
?>
$users = $query->execute();
echo $users->Posts[0]->num_posts . ' posts found';
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment