function initQuery($params) { $id = $params['id']; $tables = PromoCodes::getTables(); $c = $tables['promo_codes_coupons_table']['columns']; $this->addSelectField($c['products_affected'], 'prods'); $this->addSelectField($c['categories_affected'], 'cats'); $this->WhereValue($c['id'], DB_EQ, $id); }
/** * Uninstall the module. * . * * uninstall() . * * , , * PromoCodes::getTables() $this->getTables() */ function uninstall() { $query = new DB_Table_Delete(PromoCodes::getTables()); global $application; $application->db->getDB_Result($query); }