Mysql mail problem - 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)
+--- Thread: Mysql mail problem (
/showthread.php?tid=594642)
Mysql mail problem -
iulicxd - 21.11.2015
Hi,
When i save the Mail,in the database the last letter is remove
Problem:
I enter in the server,and exit
In database -1 caracter
Код:
enum pInfo
{
pEmail[64]
}
Login callback:
Код:
cache_get_field_content(0, "pEmail", PlayerInfo[playerid][pEmail], connects, strlen(PlayerInfo[playerid][pEmail]));
When i save:
Код:
mysql_format(connects, str,BIG_SIZE,"UPDATE `accounts` SET `pPhone` = '%s',`pTut` = '%d',`pNumbercar` = '%s',`pIpReg` = '%s',`family` = '%d',`pAvig` = '%d',`podarok` = '%d',`EmailPotverd` = '%d',`pEmail` = '%s' WHERE `Name` = '%s'",
PlayerInfo[playerid][pPhone],PlayerInfo[playerid][pTut],
PlayerInfo[playerid][pNumbercar],PlayerInfo[playerid][pIpReg],
player_family[playerid],PlayerInfo[playerid][pAvig],PlayerInfo[playerid][podarok],PlayerInfo[playerid][EmailPotverd],PlayerInfo[playerid][pEmail],PlayerInfo[playerid][pNames]);
mysql_tquery(connects, str);
When player register
Код:
mysql_format(connects, stringer, MAX_SQL, "UPDATE `accounts` SET `pEmail` = '%e' WHERE `Name` = '%s'",inputtext,PlayerInfo[playerid][pNames]);
mysql_tquery(connects, stringer);
strmid(PlayerInfo[playerid][pEmail], inputtext, 0, strlen(inputtext), 64);