MYSQL Plugin by StrickenKid - HELP
#4

Вы понимаете, что вы каждый прогон цикла, в вашем коде, заставили сравнить i с функцией?) Может все таки стоит сделать так?

format(query, sizeof(query), "SELECT * FROM Tests");
mysql_query(query);
mysql_store_result();
new rows=mysql_num_rows();
if(rows > 0)
{
for(new i = 0; i < rows; i++)
{
mysql_fetch_field("ID", Field); result[i] = strval(Field)
}
}
mysql_free_result();

Или вот так:

format(query, sizeof(query), "SELECT * FROM Tests");
mysql_query(query);
mysql_store_result();
new rows=mysql_num_rows();
if(rows > 0)
{
new i=0;
while(mysql_fetch_field("ID", Field))
{
result[i] = strval(Field);
i++;
}
}
mysql_free_result();
Reply


Messages In This Thread
MYSQL Plugin by StrickenKid - HELP - by NameNone - 07.04.2013, 13:36
Re: MYSQL Plugin by StrickenKid - HELP - by eakwarp - 07.04.2013, 13:42
Re: MYSQL Plugin by StrickenKid - HELP - by NameNone - 07.04.2013, 13:48
Re: MYSQL Plugin by StrickenKid - HELP - by eakwarp - 07.04.2013, 13:59
Re: MYSQL Plugin by StrickenKid - HELP - by NameNone - 07.04.2013, 14:11
Re: MYSQL Plugin by StrickenKid - HELP - by eakwarp - 07.04.2013, 14:14
Re: MYSQL Plugin by StrickenKid - HELP - by NameNone - 07.04.2013, 14:22

Forum Jump:


Users browsing this thread: 3 Guest(s)