Ejemplo n.º 1
0
  function LoadFromDB()
  {
    $s = new BM_Query("users_cdcs");
    $s->attach(array("users_cdcs"=>"cdc"),array("prods as prod"=>"id"));
    $s->AddGroup("users_cdcs.cdc");
    $s->AddField("count(*) as c");
    $s->AddOrder("c desc");
    $this->cdcs = $s->perform();

    $a = array();
    foreach($this->cdcs as $v) $a[] = &$v->prod;
    PouetCollectPlatforms($a);
  }
Ejemplo n.º 2
0
 function LoadFromDB() {
   $s = new BM_Query("parties");
   $s->AddField("count(*) as c");
   $s->AddField("prods.party_year");
   $s->AddJoin("","prods","prods.party=parties.id");
   $s->AddWhere(sprintf_esc("parties.id != %d",NO_PARTY_ID));
   //$s->AddWhere(sprintf_esc("prods.id is not null");
   $s->AddGroup("prods.party,prods.party_year");
   $s->AddOrder("prods.releaseDate desc, prods.id desc");
   $s->SetLimit(POUET_CACHE_MAX);
   $this->data = $s->perform();
   //PouetCollectPlatforms($this->data);
 }