How to fetch and store multiple values from MySQL
#1

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
Reply
#2

When they connect, search for that IP in the banned table. You dont have to store all IPs that way.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)