MySQL help
#1

guys what is the meaning of this ?

pawn Код:
sscanf(query,"e<p<|>s[24]s[32]iii>", playerdb[playerid]);
pawn Код:
"e<p<|>s[24]s[32]iii>"
I am so confused
Reply
#2

Taken straight from the sscanf release thread.
pawn Код:
enum
    E_DATA
{
    E_DATE_C,
    Float:E_DATA_X,
    E_DATA_NAME[32],
    E_DATA_Z
}

main
{
    new
        var[E_DATA];
    sscanf("1 12.0 Bob c", "e<ifs[32]c>", var);
}
Код:
e - Start of the "enum" type
< - Starts the specification of the structure of the enum
i - An integer, corresponds with E_DATA_C
f - A float, corresponds with E_DATA_X
s[32] - A 32 cell string, corresponds with E_DATA_NAME
c - A character, corresponds with E_DATA_Z
> - End of the enum specification
Reply
#3

but can you explain further more about
Код:
' | '  and the P
what is it doing there
Reply
#4

I'm not sure, try looking at the enum and figure it out. I couldn't find anything about it in the release thread.
Reply
#5

This tut is what am i using
but i am so confused
Reply
#6

p<|> means that it splits the data into another variable when a | is found, which is what mysql_fetch_row uses to separate columns.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)