예제 #1
0
파일: user.php 프로젝트: netixx/frankiz
 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;
 }