23.05.2016, 09:40
That's because you get the data from the row 0 only. You should use a loop for that:
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 Код:
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);
}
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);