MySQL truncating player name -
zombieking - 28.05.2013
PHP код:
UPDATE users SET Name = 'zombieking', Password = '123qwe', Level = 1, Spawn = 0, TesterLevel = 0, HelperLevel = 0, AdminLevel = 0, RegularRank = 0, UpgradePoints = 0, ConnectedTime = 54, Registered = 1, Sex = 2, Age = 23, GPS = 0, Origin = 2, CK = 0, Muted = 0, Frozen = 0, Blind = 0, Respect = 0, Money = 0, Bank = 0, Crimes = 0, CrimeReason = '', Wanted = 0, WantedLevel = 0, Kills = 0, Deaths = 0, Arrested = 0, WantedDeaths = 0, Phonebook = 0, LottoNr = 0, Fishes = 0, BiggestFish = 0, Job = 0, Paycheck = 54, HeadValue = 0, Jailed = 0, JailTime = 0, CanRobTime = 0, Materials = 0, Drugs = 0, Leader = 0, Member = 0, FMember = 255, Rank = 0, `Char` = 0, ContractTime = 0, DetSkill = 0, SexSkill = 0, BoxSkill = 0, LawSkill = 0, MechSkill = 0, JackSkill = 0, CarSkill = 0, NewsSkill = 0, DrugsSkill = 0, FishSkill = 0, pHealth = 0.000000, pArmour = 50.000000, `Int` = 0, InteriorNr = 0, Local = 0, Team = 255, Model = 3, PhoneNr = 135, Car = 398663, Car2 = 9999, House = 9999 WHERE Name = 'я^¬'...
Notice this:
PHP код:
WHERE Name = 'я^¬'
It's the same variable used in UPDATE users SET Name = 'zombieking' too (this one is working).
Re: MySQL truncating player name -
zombieking - 28.05.2013
Bumping this (I know it's not allowed, but I really need a solution - I tried debugging it myself and no success)
Re : MySQL truncating player name -
Stefano.R - 28.05.2013
Can you give the whole function/command and explain the problem?
Re: MySQL truncating player name -
zombieking - 28.05.2013
The query I posted is the final result of using format (used the same variable for both of the player name occurrences). And, for some reason, this variable is sometimes truncated
Re: MySQL truncating player name -
TheStreetsRP - 28.05.2013
Just curious why you're constantly setting the username? I would remove username='%s', entirely since you're likely not actually updating it, especially since you're looking FOR that username.. Just so you can set it to the exact thing you're searching for.
AhhhHhHhH my brain
Re: MySQL truncating player name -
zombieking - 28.05.2013
If the player changed his name - that's a situation.
Re: MySQL truncating player name -
Pupak - 28.05.2013
Post
format function that generated that string.
Re: MySQL truncating player name -
zT KiNgKoNg - 28.05.2013
Try using something like this
pawn Код:
format(Query, sizeof(Query), "UPDATE `users` SET (Name, Password) VALUES ('%s','%s')", GetPname(playerid), "PASS");
Re: MySQL truncating player name -
zT KiNgKoNg - 28.05.2013
Try using something like this
pawn Код:
format(Query, sizeof(Query), "UPDATE `users` SET (Name, Password) VALUES ('%s','%s')", GetPname(playerid), "PASS");
You might as well use something like, Because you're basically just going to remove the name itself and have nothing for the query to search...
pawn Код:
"UPDATE `users` SET (Name, Password) VALUES ('%s','%s') WHERE `Name` = '%NAME%"
Again this is upto you can i can't anymore without see the entire part of what you need help with, Thanks.