mysql problem
#1

Why it gives Server Unknow command? There is no warning or any print error from mysql. There might be some mistake from the code below. Please let me know. thank you!

Код:
COMMAND:top(playerid, params[])
{
	new
		Query[160],
	    count = 10,
	    result[2][32],
 		stringt[(24 + 10) * 10];

	mysql_format(gSQL, Query, "SELECT `Score`, `PlayerName` FROM `"#MYSQL_TABLE"` ORDER BY `Score` ASC LIMIT 10");
	mysql_function_query(gSQL, Query, true, "LoadPlayer", "d", playerid);
	
	if (mysql_num_rows() < 1) return 0;
	
	while (mysql_retrieve_row() && count > 0)
	{
		mysql_fetch_field_row(result[0], "Score");
		mysql_fetch_field_row(result[1], "PlayerName");

		format(stringt, sizeof(stringt), "%s%d. %s: %d\n", stringt, count--, result[1],strval(result[0]));
	}
	ShowPlayerDialog(playerid, 1223, DIALOG_STYLE_MSGBOX, "Top 10", stringt, "Close", "");
	return 1;
}
Reply


Messages In This Thread
mysql problem - by kbalor - 12.11.2013, 12:29
Re: mysql problem - by Loot - 12.11.2013, 12:36
Re: mysql problem - by kbalor - 12.11.2013, 12:38
Re: mysql problem - by Loot - 12.11.2013, 13:11
Re: mysql problem - by kbalor - 12.11.2013, 13:31
Re: mysql problem - by Loot - 12.11.2013, 13:39
Re: mysql problem - by kbalor - 12.11.2013, 13:47
Re: mysql problem - by Loot - 12.11.2013, 13:55
Re: mysql problem - by -Prodigy- - 12.11.2013, 14:22
Re: mysql problem - by kbalor - 12.11.2013, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)