30.04.2013, 08:33
I'm no expert with the mySQL plugin or SQL itself but in my callback I just have this:
I wouldn't use the 'field ID' thing as what if you add a field between other fields? Then your entire order messes up.
pawn Код:
new rows, fields;
cache_get_data(rows, fields);
// Check if account exists
if(rows)
{
new temp[256];
// Load an integer
cache_get_field_content(0, "SomeFieldName", temp);
pInfo[playerid][some_var] = strval(temp);
// Load a string directly into an enum/array structure
cache_get_field_content(0, "AnotherFieldName", pInfo[playerid][some_string]);
}
else
{
// No account, prompt to register or whatever
}