SQL date
#5

Quote:
Originally Posted by itsCody
Посмотреть сообщение
No. Change the date column to an int and just use

PHP код:
new dmy;
getdate(ymd);
mysql_format(mysqlquerysizeof(query),"INSERT INTO `table` (`Date`) VALUES ('%i/%i/%i')"dmy,); 
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(mysqlquerysizeof(query),"INSERT INTO `crimes` (`Name`,`Reason`,`Date`) VALUES ('%e','%e','%i/%i/%i')",GetName(otherplayer),reason,dmy); 
[php](error #1265) Data truncated for column 'Date' at row 1[php]
Reply


Messages In This Thread
SQL date - by Squirrel - 10.01.2016, 23:31
Re: SQL date - by itsCody - 10.01.2016, 23:36
Re: SQL date - by Squirrel - 10.01.2016, 23:39
Re: SQL date - by itsCody - 10.01.2016, 23:47
Re: SQL date - by Squirrel - 11.01.2016, 00:05
Re: SQL date - by itsCody - 11.01.2016, 00:06
Re: SQL date - by Squirrel - 11.01.2016, 00:07
Re: SQL date - by AmigaBlizzard - 11.01.2016, 08:14
Re: SQL date - by AmigaBlizzard - 11.01.2016, 08:16
Re: SQL date - by Runn3R - 11.01.2016, 08:17

Forum Jump:


Users browsing this thread: 2 Guest(s)