Ajoute un contrôle sur le pourcentage réalisé dans update()

This commit is contained in:
Rodolphe Quiedeville 2003-11-17 13:30:36 +00:00
parent 020f0fa9d1
commit 18280df48e

View File

@ -120,8 +120,8 @@ class ActionComm
print $this->db->error(); print $this->db->error();
} }
} }
/* /**
* * Supprime l'action
* *
* *
*/ */
@ -134,12 +134,16 @@ class ActionComm
return 1; return 1;
} }
} }
/* /**
* * Met à jour l'action
* *
*/ */
Function update() Function update()
{ {
if ($this->percent > 100)
{
$this->percent = 100;
}
$sql = "UPDATE llx_actioncomm "; $sql = "UPDATE llx_actioncomm ";
$sql .= " SET percent=$this->percent"; $sql .= " SET percent=$this->percent";