Changeset 4312

Show
Ignore:
Timestamp:
04/30/08 18:00:25 (14 months ago)
Author:
jwage
Message:

fixes #1001 again

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/manual/docs/en/dql-doctrine-query-language/select-queries.txt

    r4311 r4312  
    8181$query = Doctrine_Query::create(); 
    8282 
    83 $query->select('u.*, COUNT(p.id) num_posts') 
     83$query->select('u.id, COUNT(p.id) num_posts') 
    8484      ->from('User u, u.Posts p') 
    8585      ->where('u.id = ?', 1) 
     
    9090echo $users->Posts[0]->num_posts . ' posts found'; 
    9191</code> 
    92  
    93 This above example works only in mysql. In pgsql it is required that you group by all the columns being selected  
    94 when using aggregate functions in the select.