How to fetch and store multiple values 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: How to fetch and store multiple values from MySQL (
/showthread.php?tid=661477)
How to fetch and store multiple values from MySQL -
nikotragedy - 06.12.2018
Hey guys!
I've been thinkin about doing something like (I'm using pseudo code):
run query
store in cache the results
Код:
for(var i = 0; i < num_rows_cache; i++) {
array[i] = cache_get_value_name(i, "Column name");
}
Is there any better way to achieve this? I just want to store banned IP's into an array so I can check them before a player logs in
Re: How to fetch and store multiple values from MySQL -
GTLS - 06.12.2018
When they connect, search for that IP in the banned table. You dont have to store all IPs that way.