From ef4a8f9e736925f75fccb855aedfc75c1dbae685 Mon Sep 17 00:00:00 2001 From: "Stefan A. Brannfjell" Date: Sun, 18 Jun 2017 15:17:46 +0200 Subject: [PATCH] Achievement fix in characterprofile.php As the best answer by slawkens at otland here: https://otland.net/threads/znote-acc-sql-error-player_storage-in-characterprofile.251736/#post-2442672 --- characterprofile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/characterprofile.php b/characterprofile.php index cb7e81c..77df8b8 100644 --- a/characterprofile.php +++ b/characterprofile.php @@ -20,7 +20,8 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) { $profile_data['online'] = user_is_online_10($user_id); if ($config['Ach']) { - $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=(int)$user_id"); + $user_id = (int) $user_id; + $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=$user_id"); } } else { // TFS 0.2, 0.3 if (!$loadOutfits) {