Command for checking who is registered on that ip
#2

That's because you get the data from the row 0 only. You should use a loop for that:
pawn Код:
for (new i; i != num_rows; i++)
{
    cache_get_row(i, 0, temp_username); // only 1 field so no need to let it search for the fieldid
    iEcho(temp_username);
}
EDIT:
Also escape your strings to avoid from being victim of SQL Injection and also selecting only the field you want and not all the data.

pawn Код:
mysql_format(dbhandle,query,sizeof(query),"SELECT username FROM user WHERE regip ='%e'",temp_ip);
Reply


Messages In This Thread
Command for checking who is registered on that ip - by justjamie - 23.05.2016, 09:38
Re: Command for checking who is registered on that ip - by Konstantinos - 23.05.2016, 09:40
Re: Command for checking who is registered on that ip - by justjamie - 23.05.2016, 09:42

Forum Jump:


Users browsing this thread: 1 Guest(s)