{"id":3502,"date":"2024-06-21T10:35:38","date_gmt":"2024-06-21T10:35:38","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/error-1067-42000-at-line-46-invalid-default-value-for-last-check-time\/"},"modified":"2025-05-21T18:14:34","modified_gmt":"2025-05-21T12:44:34","slug":"error-1067-42000-at-line-46-invalid-default-value-for-last-check-time","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/error-1067-42000-at-line-46-invalid-default-value-for-last-check-time\/","title":{"rendered":"Solved: ERROR 1067 (42000) at line 46: Invalid default value for &#8216;last_check_time&#8217;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are facing an ERROR 1067 (42000) at line 46: Invalid default value for \u2018last_check_time,\u2019 then I have this solution for you, but let us first understand why such an error can happen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This error means that the default value for the \u2018last_check_time\u2019 is invalid.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This error could also happen because the last default value doesn\u2019t have a valid date or time, or the column type is not compatible with the default value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s look at the solution to fix this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution for ERROR 1067 (42000) at line 46: Invalid default value for \u2018last_check_time\u2019<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The simple solution here is that you will need to change the default value of the \u2018last_check_time\u2019 to a valid value. And here is how you can do it using the ALTER TABLE statement.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ALTER TABLE my_table\nCHANGE last_check_time last_check_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After inserting this code, the value and the input should work perfectly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are facing an ERROR 1067 (42000) at line 46: Invalid default value for \u2018last_check_time,\u2019 then I have this solution for you, but let&#8230;<\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-3502","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=3502"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3502\/revisions"}],"predecessor-version":[{"id":14108,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3502\/revisions\/14108"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=3502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=3502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=3502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}