MySQL Help, how do I get the results of this query?
#1

pawn Код:
format(query, sizeof(query), "SELECT `CSlot1`, `CSlot2`, `CSlot3`, `FSkin` `SkinSlot` FROM `accounts` WHERE id IN(%d, %d, %d, %d)", AccID[playerid][0], AccID[playerid][1], AccID[playerid][2], AccID[playerid][3]);
    mysql_tquery(dbHandle, query, "GetMASkinSlot", "si",pPass[playerid], playerid);
I thought it may be something like this, but it doesn't get any results.
pawn Код:
forward GetMASkinSlot(intext[], playerid);
public GetMASkinSlot(intext[], playerid)
{
    AccIDSkinUsed[playerid][0] = cache_get_row_int(0, 4);
    AccIDSkinUsed[playerid][1] = cache_get_row_int(1, 4);
    AccIDSkinUsed[playerid][2] = cache_get_row_int(2, 4);
    AccIDSkinUsed[playerid][3] = cache_get_row_int(3, 4);//SKIN SLOT USED FOR ALL 4 ACCOUNTS (possible).
Reply
#2

Bump?
Reply
#3

PHP код:
AccIDSkinUsed[playerid][0] = cache_get_row_int(04);
    
AccIDSkinUsed[playerid][1] = cache_get_row_int(14);
    
AccIDSkinUsed[playerid][2] = cache_get_row_int(24);
    
AccIDSkinUsed[playerid][3] = cache_get_row_int(34);//SKIN SLOT USED FOR ALL 4 ACCOUNTS (possible). 
Quote:

Syntax: cache_get_row_int(row, field_idx, connectionHandle = 1)

for example to get value of CSlot1 and FSkin:
PHP код:
AccIDSkinUsed[playerid][0] = cache_get_row_int(0"CSlot1");
AccIDSkinUsed[playerid][1] = cache_get_row_int(0"FSkin"); 
Reply
#4

That's the incorrect syntax.
Reply
#5

Still unresolved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)