refactor: setMovementProc() to take one or multiple IDs for update

This commit is contained in:
Martin Ambrus
2017-11-08 18:21:30 +01:00
parent 21d6874325
commit 151553735d
2 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -3562,9 +3562,11 @@ class MYSQLi_DB implements IDbConnection {
}
function setMovementProc($moveid) {
list($moveid) = $this->escape_input((int) $moveid);
if (!Math::isInt($moveid)) {
list($moveid) = $this->escape_input($moveid);
}
$q = "UPDATE " . TB_PREFIX . "movement set proc = 1 where moveid = $moveid";
$q = "UPDATE " . TB_PREFIX . "movement set proc = 1 where moveid IN($moveid)";
return mysqli_query($this->dblink,$q);
}