Update all models to use StandardModel basis

This commit is contained in:
osaajani 2019-11-13 03:24:22 +01:00
parent 0e22f3d02c
commit 155a048834
17 changed files with 580 additions and 1478 deletions

View file

@ -416,7 +416,7 @@
}
$query = "UPDATE `" . $table . "` SET " . implode(', ', $sets) . " WHERE 1 AND " . implode(' AND ', $wheres);
$query = "UPDATE `" . $table . "` SET " . implode(', ', $sets) . " WHERE 1 " . (count($wheres) ? " AND " : "") . implode(' AND ', $wheres);
return $this->_run_query($query, $params, self::ROWCOUNT);
}
@ -438,7 +438,7 @@
$params = array_merge($params, $condition['PARAM']);
}
$query = "DELETE FROM `" . $table . "` WHERE 1 AND " . implode(' AND ', $wheres);
$query = "DELETE FROM `" . $table . "` WHERE 1 " . (count($wheres) ? " AND " : "") . implode(' AND ', $wheres);
return $this->_run_query($query, $params, self::ROWCOUNT);
}