public function removeStudy($formation, $forlife) { $formation_id = $formation instanceof Formation ? $formation->id() : $formation; XDB::execute('DELETE FROM studies WHERE uid = {?} AND formation_id = {?} AND forlife = {?}', $this->id(), $formation_id, $forlife); if (!(XDB::affectedRows() > 0)) { return false; } $this->select(UserSelect::studies()); return true; }