09.11.2009, 17:23
I've tried to figure it out based on what you provided here, but the explode(result, row, "|"); is really confusing me.
What is that exactly? Can you show me the code for that if you don't mind? Specifically the explode function.
Here is what I have now:
new query[256];
new row[256];
new result[256];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
mysql_real_escape_string(pname,pname);
MySQLCheck();
format(query,sizeof(query),"SELECT * FROM `"TABLENAME"` WHERE account_name = '%s'",pname);
mysql_query(query);
mysql_store_result();
mysql_fetch_row_format(row, "|");
explode(result, row, "|");
PlayerInfo[playerid][account_id] = strval(result[0]);
PlayerInfo[playerid][account_name] = strval(result[1]);
PlayerInfo[playerid][account_password] = strval(result[2]);
.pwn(2807) : error 017: undefined symbol "explode"
Does that look good (besides the explode not working)?
What is that exactly? Can you show me the code for that if you don't mind? Specifically the explode function.
Here is what I have now:
new query[256];
new row[256];
new result[256];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
mysql_real_escape_string(pname,pname);
MySQLCheck();
format(query,sizeof(query),"SELECT * FROM `"TABLENAME"` WHERE account_name = '%s'",pname);
mysql_query(query);
mysql_store_result();
mysql_fetch_row_format(row, "|");
explode(result, row, "|");
PlayerInfo[playerid][account_id] = strval(result[0]);
PlayerInfo[playerid][account_name] = strval(result[1]);
PlayerInfo[playerid][account_password] = strval(result[2]);
.pwn(2807) : error 017: undefined symbol "explode"
Does that look good (besides the explode not working)?