26.04.2011, 15:50
I can see you're using a variable to store the connection.
One problem that I've noticed, is that you're not assigning that variable to mysql_query and mysql_fetch_row_format.
@ Aldo.: You're right, although your example is not too good either, since you're fetching the WHOLE row, data that you might not use. The only flaw in SaW's query is that he is not using ` and ' around field and table names and that might cause incorrect data to be retrieved or even crashing.
EDIT: If you are using the plugin version, use an enum to organize your player variables, so that you could do something like this:
One problem that I've noticed, is that you're not assigning that variable to mysql_query and mysql_fetch_row_format.
pawn Код:
mysql_query(query2, -1, -1, MySQL_Conn);
mysql_fetch_row_format(data, "|", MySQL_Conn);
EDIT: If you are using the plugin version, use an enum to organize your player variables, so that you could do something like this:
pawn Код:
sscanf(data, "e<p<|>iiiii(data types)>", PlayerInfo[playerid]);