03.04.2014, 15:39
Hello how can I get date on onplayerdisconnect and then it save like that 2/4/2014 in mysql but instead of that I get something like 167.833333333333333333. I have something like this but I have problem since last night and from then I can't solve it. I was all day spend on get date in mysql acc to be written but nothing. I save date as varchar and I have variable PlayerInfo[playerid][LastActivity]. So here is what I have on public onplayerdisconnect
pawn Код:
new str[255],day,month,year;
getdate(day,month,year);
format(str,255,"%d/%d/%d",day,month,year);
strmid(PlayerInfo[playerid][LastActivity],str,0,strlen(str),255);
and here is saving
mysql_format(mysql,query,sizeof(query),"UPDATE `users` SET `LastActivity` = %s