deepson2 Posted May 25, 2009 Share Posted May 25, 2009 Hello, I wanted to update my column after each 15 minute. so i was using following query. MySQL Code: UPDATE author SET status = if(UNIX_TIMESTAMP(last_access)+(60*15) > NOW(),1,0) WHERE id=9 but getting this error: MySQL said: #1265 - Data truncated for column 'status' at row 1 can anyone tell me how can i remove this error? my status column's type is Enum(0/1) and last_access's type is datetime. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/159541-update-column-according-to-another-columns-value/ Share on other sites More sharing options...
fenway Posted June 1, 2009 Share Posted June 1, 2009 ENUM is not the same as INT.... Link to comment https://forums.phpfreaks.com/topic/159541-update-column-according-to-another-columns-value/#findComment-846839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.