Пример #1
0
 protected static function getQbBase()
 {
     $qb = Db::createQueryBuilder();
     $qb->select('*')->from(Config::get("db_pref", "shotgun_") . "option", "o")->from(Config::get("db_pref", "shotgun_") . "choice", "c")->where('o.fk_choice_id = c.choice_id');
     return $qb;
 }
Пример #2
0
 protected static function getQbBase()
 {
     $qb = Db::createQueryBuilder();
     $qb->select('*')->from(Config::get("db_pref", "shotgun_") . "desc", "d");
     return $qb;
 }
Пример #3
0
 public function update()
 {
     $qb = Db::createQueryBuilder();
     $qb->update(Config::get("db_pref", "shotgun_") . "choice", 'c')->set('c.choice_name', ':name')->setParameter('name', $this->name)->set('c.choice_priceC', ':priceC')->setParameter('priceC', $this->priceC)->setParameter('priceNC', $this->priceNC)->set('c.choice_stock', ':stock')->setParameter('stock', $this->stock);
     $qb->where('c.choice_id = :choice_id')->setParameter('choice_id', $this->id);
     $qb->execute();
 }