0

Here is my problem, i'm trying to do tag cloud in symfony, what i want to perform is such a sql query

select tag, count(tag) from tagi group by tag order by count(tag) desc limit 10

anyone can help?

4

1 に答える 1

1

「タグ」テーブルにマップする Peer (BasePeer ではない) クラスに関数を作成します。例:

public static function doGetTags() {

    $connection = Propel::getConnection();
    // get the query from configuration
    $query = sfConfig::get('app_query_tags_all');
    $statement = $connection->prepare($query);
    $statement->execute();
    $results = self::populateObjects($statement);
}
于 2009-09-17T13:55:20.777 に答える