03.09.2011, 13:07
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);
}