diff --git a/helpers/position.php b/helpers/position.php index 1a03a41..02cd9f7 100644 --- a/helpers/position.php +++ b/helpers/position.php @@ -91,10 +91,10 @@ class uPosition { public function getAll($userId = NULL, $trackId = NULL) { $rules = []; if (!empty($userId)) { - $rule[] = "p.user_id='" . self::$db->real_escape_string($userId) ."'"; + $rules[] = "p.user_id='" . self::$db->real_escape_string($userId) ."'"; } if (!empty($trackId)) { - $rule[] = "p.track_id='" . self::$db->real_escape_string($trackId) ."'"; + $rules[] = "p.track_id='" . self::$db->real_escape_string($trackId) ."'"; } if (!empty($rules)) { $where = "WHERE " . implode(" AND ", $rules);