- XDB::execute("DELETE FROM {$this->table} WHERE {$this->idfield} = {?}",$id);
- $page->trigSuccess("L'entrée ".$id." a été supprimée.");
+ $where = XDB::format("{$this->idfield} = {?}", $id);
+ if ($this->idfield2) {
+ $where .= XDB::format(" AND {$this->idfield2} = {?}", $id2);
+ }
+ XDB::rawExecute("DELETE FROM {$this->table} WHERE " . $where);
+ $page->trigSuccess("L'entrée " . $id . (($id2) ? '-' . $id2 : '') . ' a été supprimée.');