Mam sobie oto taki kod (poniżej) i niestety dodaje mi się wartość absolutnie z dupy -> Chodzi o "$QueryTwo->bindValue(":two", $SID);"
Załączam filmik na YT aby zobrazować sytuację -> https://youtu.be/P8EHgCzkcw4
<?php require_once('./config.php'); $MySQL = new PDO('mysql:host='.$DB[0].'; dbname='.$DB[3].'; charset=utf8;', $DB[1], $DB[2]); require_once('./application/modules/SystemLoader.php'); $MySQL->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $MySQL->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $Core = new Core(); $SteamAuth = new SteamAuth(); $SID = $SteamAuth->Validate(); if($SID == '') { $_SESSION['SID'] = false; } else { $_SESSION['SID'] = $SID; $Query = $MySQL->prepare("SELECT `id`, `ranks` FROM `users` WHERE `steam_id`=:one"); $Query->bindValue(":one", $SID, PDO::PARAM_INT); $Query->execute(); if($Query->rowCount() > 0) { $Fetch = $Query->fetch(); $_SESSION['LOGGED'] = true; $_SESSION['ID'] = $Fetch['id']; $_SESSION['RANKS'] = $Fetch['ranks']; } else { $Data = $SteamAuth->GetData($SID); $QueryTwo = $MySQL->prepare("INSERT INTO `users` VALUES('', :one, :two, :three, 'DefaultTradeURL', '0', '0', '0')"); $QueryTwo->bindValue(":one", $Data['response']['players'][0]['personaname'], PDO::PARAM_STR); $QueryTwo->bindValue(":two", $SID); $QueryTwo->bindValue(":three", $Data['response']['players'][0]['avatar'], PDO::PARAM_STR); $QueryTwo->execute(); } } //header("Location: home2.html"); ?>
PS. Pole w tabeli jest w stanie pomieścić taką wartość ponieważ jest ustawione na INT(40)