[HELP] Getting data from MySQL database ????
#7

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)?
Reply


Messages In This Thread
[HELP] Getting data from MySQL database ???? - by cAMo - 08.11.2009, 22:03
Re: [HELP] Getting data from MySQL database ???? - by Redgie - 08.11.2009, 23:30
Re: [HELP] Getting data from MySQL database ???? - by cAMo - 09.11.2009, 00:00
Re: [HELP] Getting data from MySQL database ???? - by cAMo - 09.11.2009, 12:08
Re: [HELP] Getting data from MySQL database ???? - by Think - 09.11.2009, 12:23
Re: [HELP] Getting data from MySQL database ???? - by cAMo - 09.11.2009, 12:41
Re: [HELP] Getting data from MySQL database ???? - by cAMo - 09.11.2009, 17:23
Re: [HELP] Getting data from MySQL database ???? - by Marcel - 09.11.2009, 18:59
Re: [HELP] Getting data from MySQL database ???? - by cAMo - 10.11.2009, 09:18
Re: [HELP] Getting data from MySQL database ???? - by Marcel - 10.11.2009, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)