Hi folks, I want to do a count with propel on one of my tables
The standard propel count for my peer class produces: SELECT COUNT(foto.ID) FROM foto which is fine. But when I try to add another count with a field from another table, like this: $c->addjoin(FotoPeer::ID, VerkaufPeer::FOTO_ID, 'LEFT JOIN'); $c->addAsColumn('countVerkauf', 'COUNT('.VerkaufPeer::FOTO_ID.')'); $c->add('countVerkauf', 0); the result is SELECT COUNT(foto.ID) FROM (foto, countVerkauf) LEFT JOIN verkauf ON (foto.ID=verkauf.FOTO_ID) WHERE Why is that? Is it not working because of the alias? Is there a work around? When I do this for a select query with three more joins and without a WHERE clause it's working! Greetings from Berlin, Pierre --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---