SA-MP Forums Archive
Updating in database ... (MySQL) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Updating in database ... (MySQL) (/showthread.php?tid=376151)



Updating in database ... (MySQL) - Edvin - 09.09.2012

Hi guys

I have a question about updating dates in mysql db. Ok, so in my DB I have a primary key called 'Key' for each user what register at the server. When player leaves the server, I updating in database like this:
pawn Код:
UPDATE `Players` SET `Bla Bla` = '%d', `Bla Bla 2` = '%d' WHERE `Name` = 'Player Name'
So ... what is better, to update in database like this:
pawn Код:
UPDATE `Players` SET `Bla Bla` = '%d', `Bla Bla 2` = '%d' WHERE `Key` = 'Player Register ID'
or
pawn Код:
UPDATE `Players` SET `Bla Bla` = '%d', `Bla Bla 2` = '%d' WHERE `Name` = 'Player Name'
Or doesn't matter?