The problem of loading the data from the registration / login of MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: The problem of loading the data from the registration / login of MySQL (
/showthread.php?tid=165150)
The problem of loading the data from the registration / login of MySQL -
pl2010 - 03.08.2010
Hi, my problem is that when you want to add you to register and log (GUI) mysql Score, in general does not charge me a score or cash. Modified the order, but does not work:
LoginPlayer(playerid,pass[])
{
new
pName4[MAX_PLAYER_NAME],
query[256];
GetPlayerName(playerid,pName4,sizeof(pName4));
MySQLCheck();
mysql_real_escape_string(pName4,pName4);
mysql_real_escape_string(pass,pass);
format(query,sizeof(query),"SELECT Score FROM `"TABLENAME"`, SELECT Money FROM `"TABLENAME"` WHERE Username = '%s' AND Password = md5('%s') LIMIT 1",pName4,pass);
mysql_query(query,LOGIN_THREAD_ID,playerid);
//format(query,sizeof(query),"SELECT Money FROM `"TABLENAME"` WHERE Username = '%s' AND Password = md5('%s') LIMIT 1",pName4,pass);
//mysql_query(query,LOGIN_THREAD_ID,playerid); Przedtem to było ale pobierało kase i dodawało do niej Score.
return 1;
}