MySQL DATETIME
#2

use this
on the enum

[code]LastLogin[50]/CODE]

Код:
Save: 
new texts[128];
                new y,m,d;
                new hr,mins,sec;
                getdate(y,m,d);
                gettime(hr,mins,sec);
                format(texts, sizeof(texts), "%d-%d-%d %d-%d-%d", y, m, d, hr, mins, sec);
                mysql_format(Mysql_users, query, sizeof(query), "UPDATE `you_user_table` SET LastLogin = '%e' WHERE Fullname= '%e'",texts, GetPlayersName(playerid));
                mysql_tquery(Mysql_users, query, "", "");
Show in msg:
Код:
new msg[128];
format(msg, sizeof(msg), "%s", PlayerData[playerid][LastLogin]);
SendClientMessage(playerid, -1, msg);
load:

Код:
cache_get_field_content(0, "LastLogin", PlayerData[playerid][LastLogin], Mysql_users, 126);
in mysql structure:

Код:
Name: LastLogin 
Type: datetime
Mysql R38

Im using this script working created by me
Reply


Messages In This Thread
MySQL DATETIME - by Runn3R - 28.09.2014, 08:09
Re: MySQL DATETIME - by TheNerka - 28.09.2014, 08:19
Re: MySQL DATETIME - by Runn3R - 28.09.2014, 08:24
Re: MySQL DATETIME - by TheNerka - 28.09.2014, 08:26
Re: MySQL DATETIME - by Runn3R - 28.09.2014, 08:28
Re: MySQL DATETIME - by Runn3R - 28.09.2014, 08:47
Re: MySQL DATETIME - by AroseKhanNiazi - 01.07.2016, 16:25
Re: MySQL DATETIME - by PrO.GameR - 01.07.2016, 17:11
Re: MySQL DATETIME - by AroseKhanNiazi - 01.07.2016, 17:20
Re: MySQL DATETIME - by AroseKhanNiazi - 02.07.2016, 17:12

Forum Jump:


Users browsing this thread: 1 Guest(s)