SA-MP Forums Archive
How do I get this result from SQL? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do I get this result from SQL? (/showthread.php?tid=635664)



How do I get this result from SQL? - Dokins - 11.06.2017

This result seems to put 2 results the same, i.e I do one query and it gives me 2 results that are oddly showing it.

QUERY
pawn Код:
format(query, sizeof(query), "SELECT * FROM `arecords` WHERE PSQLID IN(%d, %d, %d)", BSub[playerid][0], BSub[playerid][1], BSub[playerid][2]);
                    mysql_tquery(dbHandle, query, "GetBloodResult", "i",playerid);
pawn Код:
for(new x = 0; x < 3; x++)
    {
        if(BSub[playerid][x] == cache_get_row_int(x, 1))
        {
            BSampRes[playerid][x] = 1;
            printf("BSAMP %d", cache_get_row_int(x, 1));//issue area
            printf("BSAMPP %d", BSub[playerid][x]);
        }
        else if(BSampRes[playerid][x] == 0)
        {
            foreach(Player, i)
            {
                if(RecentHospital[i] == 1 && PlayerSQLID[i] == BSub[playerid][i])
                {
                    BSampRes[playerid][x] = 2;
                }
            }
        }
    }
Basically, it puts 2 results although I requested 1.


Re: How do I get this result from SQL? - Dokins - 11.06.2017

Unresolved.


Re: How do I get this result from SQL? - Dokins - 12.06.2017

Still unresolved.