Getting Part of a Player's name from 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: Getting Part of a Player's name from MySQL (
/showthread.php?tid=316560)
Getting Part of a Player's name from MySQL -
Dokins - 07.02.2012
How would I do this:
say I type in /findnumber Grant
It gives me a list (according to the database) of everyone that has the firstname or part of their name "Grant" And displays the number?
Re: Getting Part of a Player's name from MySQL - T0pAz - 07.02.2012
Is your first name and last name separated into columns or is it in one column?
Re: Getting Part of a Player's name from MySQL -
Dokins - 07.02.2012
One column.
Re: Getting Part of a Player's name from MySQL - T0pAz - 07.02.2012
Quote:
Originally Posted by Dokins
One column.
|
Then you have to split it with sscanf as _ as the delimiter.
Re: Getting Part of a Player's name from MySQL -
[LoF]Zak - 07.02.2012
Hi, I think you will need to use a query designed like:
pawn Код:
SELECT username FROM Accounts WHERE username LIKE '%s'
And then for each row, grab the username and display it, either in a dialog, or client messages.
Re: Getting Part of a Player's name from MySQL -
Dokins - 07.02.2012
Quote:
Originally Posted by T0pAz
Then you have to split it with sscanf as _ as the delimiter.
|
Could you give me an example?
Re: Getting Part of a Player's name from MySQL -
DreDasLT - 19.01.2014
Yeah, i need it too