SA-MP Forums Archive
MySQL Help - 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: MySQL Help (/showthread.php?tid=425820)



MySQL Help - Fernado Samuel - 26.03.2013

Removed


Re: MySQL Help - [KHK]Khalid - 26.03.2013

Show the code where you check whether a player is registered or not (by name).


Re: MySQL Help - ReneG - 26.03.2013

That is why you should use an auto increment id for each user, two users will never have the same id, which will avoid this problem. It's more efficient this way.

If you're lazy to change your whole system, you can use the BINARY keyword in your query.

example

Код:
SELECT `username` FROM `users` WHERE BINARY `username` = 'Fernado'
or, you could just try changing the language collation to latin_gener_cs.

http://stackoverflow.com/questions/5...rison-on-mysql


Re: MySQL Help - [MG]Dimi - 26.03.2013

Thing is that MySQL isn't case sensitive so it will select FERNARDO, fernardo, FeRnArDo etc.

Read http://dev.mysql.com/doc/refman/5.0/...nsitivity.html


Re: MySQL Help - Fernado Samuel - 26.03.2013

Removed


Re: MySQL Help - ReneG - 27.03.2013

Quote:
Originally Posted by Fernado Samuel
Посмотреть сообщение
How to add BINARY to this code?
Did you read the query example at all?
pawn Код:
format(Query,sizeof(Query),"SELECT `user` FROM `playerdata` WHERE BINARY `user` = '%s' LIMIT 1;",pname);



Re: MySQL Help - Vince - 27.03.2013

You don't need to change anything in the queries. Just set the table's collation setting to latin1_general_cs. It doesn't really matter which setting you choose, as long as it has the _cs at the end (which stands for Case Sensitivity).