05.08.2019, 17:16
Quote:
MySQL is not case sensitive lmao.. USERS and users and uSeRs are considered same.
|
https://dev.mysql.com/doc/refman/8.0...nsitivity.html
Quote:
I over looked some details but I have fixed them now. Thank you guys for the appreciation and criticism. Criticism makes someone always better.
|
1) Set `Name` column as UNIQUE KEY.
2) Bcrypt returns 60 characters but you used VARCHAR(255). Length is fixed so better use CHAR(60)
3) Column `Level` is misleading.
4) When a value of column is always between a small range, use different type of integer (MEDIUMINT, SMALLINT, TINYINT)
About Base.pwn
1) Standalone foreach is very outdated, YSI 5 and y_iterate.
2) Pass handle parameter in mysql_errno function because if a filterscript uses mysql and no duplicated connections, it will use handle 1 as default.
3) In OnPlayerConnect, you select all just to see if there are rows. Either COUNT() aggregate function or select password and id there and not in dialog response.
4)
pawn Code:
mysql_tquery(handle, query, "OnPlayerLogin", "ds", playerid, inputtext);
5)
pawn Code:
"SELECT password, Master_ID from `USERS` WHERE Name LIKE '%s'"
6) Be consistent about table and column names. Read my reply to GeorgeMcReary as a reference.
7) `MasterID` column is PRIMARY KEY, LIMIT keyword is obsolete.
8 ) Check against race condition.