Mysql Issue
#1

Some reason this is only loads the top record could anyone please help me out?

Код:
forward LoadMyReports(playerid);
public LoadMyReports(playerid)
{
    if(!cache_num_rows()) return SendClientMessage(playerid, COLOR_GRAY, "{1E90FF}(Server):{dadada} You don't have any open reports!");
     
    new str[3200], showReason[200], stats[100];

    format(str, sizeof(str), "ID\tVictim\tReason\tStatus\n");
	for(new i = 0, x = cache_get_row_count(SQL_CONNECTION); i < x; i++)
	{
		
		new showSQLID = cache_get_field_content_int(i, "SQLID");
		new showVictim =cache_get_field_content_int(i, "vID");
		cache_get_field_content(i, "Reason", showReason);
		new showStatus = cache_get_field_content_int(i, "Status");

		switch(showStatus)
		{
			case 0: stats = "{00FF00}Open";
			case 1: stats = "{DE4816}Being Handled";
		}
		
		format(str, sizeof(str), "%s%d\t%s\t%s\t%s\n", str, showSQLID, GetNameFromDB(showVictim), showReason, stats);
	}
	
	ShowPlayerDialog(playerid, DIALOG_MYREPORTS, DIALOG_STYLE_TABLIST_HEADERS, "Your Reports", str, "Close","Close");
	return true;
}
Reply


Messages In This Thread
Mysql Issue - by JessThompson - 04.01.2018, 20:44
Re: Mysql Issue - by Mikro - 04.01.2018, 21:11
Re: Mysql Issue - by JessThompson - 04.01.2018, 21:12
Re: Mysql Issue - by Mikro - 04.01.2018, 21:16
Re: Mysql Issue - by JessThompson - 04.01.2018, 21:21
Re: Mysql Issue - by Mikro - 04.01.2018, 21:33
Re: Mysql Issue - by iLearner - 05.01.2018, 06:05
Re: Mysql Issue - by Lucases - 05.01.2018, 07:35

Forum Jump:


Users browsing this thread: 1 Guest(s)