Some reason this is only loads the top record could anyone please help me out?
Code:
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;
}