No save Mysql ?
#4

If you have set the "LastActivity" column as "datetime" in MySQL:
PHP код:
    // Get the current date, time
    
getdate(YearMonthDay);
    
gettime(HourMinuteSecond);
    
// Construct the complete date to be added to MySQL for the registration date+time
    
format(Datesizeof(Date), "%04d-%02d-%02d %02d:%02d:%02d"YearMonthDayHourMinuteSecond); 
You need to add the "02" and "04" values to the structure of the date and time.
MySQL expects this structure where all values are 2 characters or 4 characters long.
If you would have the 1st of January, your string would end up like "2016-1-1 0:0:9" for example, when the time is only 9 seconds past midnight, while MySQL expects "2016-01-01 00:00:09".

This won't apply if that column is set a varchar of course, only for datetime.

See if this does the trick.
Reply


Messages In This Thread
No save Mysql ? - by thaihan - 12.01.2016, 12:20
Re: No save Mysql ? - by SaltySandy - 12.01.2016, 12:53
Re: No save Mysql ? - by Sk1lleD - 12.01.2016, 13:51
Re: No save Mysql ? - by AmigaBlizzard - 12.01.2016, 21:40

Forum Jump:


Users browsing this thread: 3 Guest(s)