Quote:
Originally Posted by itsCody
No. Change the date column to an int and just use
PHP код:
new d, m, y;
getdate(y, m, d);
mysql_format(mysql, query, sizeof(query),"INSERT INTO `table` (`Date`) VALUES ('%i/%i/%i')", d, m, y,);
Depends on how you want to use the date, but that's how I insert the dates on my ban queries, and reports.
|
Yeah but im getting some errors in the log
PHP код:
mysql_format(mysql, query, sizeof(query),"INSERT INTO `crimes` (`Name`,`Reason`,`Date`) VALUES ('%e','%e','%i/%i/%i')",GetName(otherplayer),reason,d, m, y);
[php](error #1265) Data truncated for column 'Date' at row 1[php]