All pastes #489751 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-15 18:04 UTC
rendered paste body
    $q = new Doctrine_Query();
    $tags = 
       $q->select('t.*, i18n.*, COUNT(i18n.normalized_tag) count')    
      ->from('LocationTag t LEFT JOIN t.LocationTagI18n i18n')
      ->where('i18n.culture = ?', $culture)
      ->groupby('i18n.normalized_tag')
      ->orderby('count DESC')
      ->limit($max)
      ->execute();

// this does not work
// $tag[0]->get('count');