mysql timestamps
#1

stock date return 0 and timestamp return 0, why?
pawn Код:
stock date(days, months, years)
{
    new string[128], timestamp, hours, minutes, seconds;
    gettime(hours, minutes, seconds);
    format(string, sizeof(string), "SELECT UNIX_TIMESTAMP('%d-%02d-%02d %02d:%02d:%02d')", years, months, days, hours, minutes, seconds);
    mysql_query(string);
    mysql_store_result();

    timestamp = mysql_fetch_int();
    mysql_free_result();
    return timestamp;
}

stock timestamp(timestamp) //not finished
{
    new string[128];
    format(string, sizeof(string), "SELECT FROM_UNIXTIME(%d, '%Y %D %M')", timestamp);
    mysql_query(string);
}
Reply


Messages In This Thread
mysql timestamps - by Unknown123 - 03.09.2011, 13:07
Re: mysql timestamps - by Kar - 03.09.2011, 14:17
Re: mysql timestamps - by JaTochNietDan - 03.09.2011, 14:20
Re: mysql timestamps - by Unknown123 - 03.09.2011, 15:22
Re: mysql timestamps - by Improvement™ - 03.09.2011, 16:03
Re: mysql timestamps - by Unknown123 - 03.09.2011, 16:30
Re: mysql timestamps - by Improvement™ - 03.09.2011, 16:36
Re: mysql timestamps - by Unknown123 - 03.09.2011, 16:43
Re: mysql timestamps - by Improvement™ - 03.09.2011, 17:09
Re: mysql timestamps - by Unknown123 - 03.09.2011, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)