Wed, May 25, 2022
https://devcodepro.comdevcodepro
Home · Latest · Trends
6

MySQL update - Incorrect date value: 0000-00-00 00:00:00

MySQL error when update default value for DATETIME
UPDATE `users` SET `lastdate`='2017-01-01 00:00:00';

ALTER TABLE `users` CHANGE `lastdate` `lastdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
rated 6 times (6) (0)
comments: 0 / hits: 2947  / 5 years ago, sun, aug 6, 17, 05:31:35
More From » SQL
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
Login with Google
 
Share
Posted
bigjoe
Member since Aug 6, 2017
Total Code Snippets: 5
Total Comments: 0
Location: n/a
bigjoe snippets
5 years ago, sun, aug 6, 17, 5:14:06
SELECT *, COUNT(reviewid) AS counter FROM article LEFT JOIN reviews on article.id = reviews.articleid GROUP BY article.id, reviews.articleid ORDER BY article.id DESC LIMIT 12;
comments: 0 / hits: 3501
SQL
5 years ago, tue, aug 22, 17, 7:46:43
tinymce.init({ selector: 'textarea', height: 350, content_style: ".mce-content-body {font-size:13px;color: #607d8b;font-family:tahoma,verdana}", menubar: false, plugins: [ 'advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table contextmenu paste code' ], toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image' });
comments: 0 / hits: 2033
5 years ago, tue, aug 22, 17, 6:12:46
.tooltip-inner { background-color: #5589b3; border-radius: .15rem; } .tooltip.bs-tether-element-attached-bottom .tooltip-inner::before, .tooltip.tooltip-top .tooltip-inner::before { border-top-color: #5589b3; }
comments: 1 / hits: 7496
CSS
5 years ago, wed, aug 30, 17, 5:56:41
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Untitled</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> <style> body,html{ height: 200%; } #gototop{ display: none; font-size: 38px; background: rgba(97, 123, 199, 0.72); position: fixed; bottom: 50px; right: 50px; width: 70px; height: 70px; line-height: 60px; text-align: center; color: #fff; cursor:pointer; } </style> </head> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <a id="gototop"><i class="fa fa-chevron-up"></i></a> <script> $(window).scroll(function() { var offset = $("body").offset().top + 600; if ($(window).scrollTop() >= offset) { $("#gototop").show("slow"); }else{ $("#gototop").hide("slow"); } }); $("#gototop").click(function(){ $('html, body').animate({ scrollTop: 0 }, 'slow'); }); </script> </body> </html>
comments: 0 / hits: 1724