function initQuery($params) { $tables = Related_Products::getTables(); $rp_table = $tables['rp_links']['columns']; $this->addSelectTable('rp_links'); $this->addSelectField($rp_table['rp_id'], 'rp_id'); if (!is_array($params['product_id'])) { $this->WhereValue($rp_table['product_id'], DB_EQ, $params['product_id']); } else { $this->Where($rp_table['product_id'], DB_IN, "(" . implode(", ", $params['product_id']) . ")"); $this->SelectGroup($rp_table['rp_id']); } $this->SelectOrder($rp_table['sort_order']); }
function uninstall() { $query = new DB_Table_Delete(Related_Products::getTables()); }