Exemple #1
0
 /**
  * Delete a row in users_to_project
  *
  * @param int $user
  * @param int $project
  */
 public function DeleteUserToProject($user, $project)
 {
     $table = new USVN_Db_Table_UsersToProjects();
     $check = count($table->fetchRow(array('users_id = ?' => $user->users_id, 'projects_id = ?' => $project->projects_id)));
     if ($check == 1) {
         $table->delete(array('users_id = ?' => $user->users_id, 'projects_id = ?' => $project->projects_id));
     }
 }
Exemple #2
0
 /**
  * Delete all users from workusers
  *
  */
 public function deleteAllUsers()
 {
     $table = new USVN_Db_Table_UsersToProjects();
     $table->delete($table->getAdapter()->quoteInto("projects_id = ?", $this->id));
 }