mysql getting info about the row - 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 getting info about the row (
/showthread.php?tid=622094)
mysql getting info about the row -
Gusteakas - 18.11.2016
hiya
I've done that all the offline players with `Job` equal to 1 would be displayed in a list dialog. When they are in the list, they have their name and last login ( TABLIST_HEADERS ) in a row. How could I do the thing that if I select any name (any row) from that list for example the 3rd one, I would get his ID or name.
For example:
tom 1/1/1
jerry 2/2/2
john 3/3/3
And if I select the 3rd row for john i would receive his rowid or name or at least something so I could list more information about this certain player.
Re: mysql getting info about the row -
Konstantinos - 18.11.2016
The name of the player will be stored in
inputtext but keep it first as column (anything after \t is not stored) and use
inputtext in format for the query. Since the name will be used in the
WHERE clause, set it as unique key so it will scan only 1 row.